conflicts with new declaration with 'C' linkage

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
junkie_crew
Blank Cone
Blank Cone
Posts: 35
Joined: 31 Jul 2007 15:28

conflicts with new declaration with 'C' linkage

Postby junkie_crew » 05 Oct 2007 14:39

Hi,

I am still trying to build VCL (0.8.6c) for WinCE with cegcc. I am facing this error I cannot solve... :
In file included from dialogs.cpp:38:
/opt/cegcc/lib/gcc/arm-wince-cegcc/4.1.0/../../../../arm-wince-cegcc/lib/../include/w32api/shlobj.h:1483:1: warning: this is the location of the previous definition
/opt/cegcc/lib/gcc/arm-wince-cegcc/4.1.0/../../../../arm-wince-cegcc/include/tcscpy.h:6: error: previous declaration of '_TCHAR* wcscpy(_TCHAR*, const _TCHAR*)' with 'C++' linkage
/opt/cegcc/lib/gcc/arm-wince-cegcc/4.1.0/../../../../arm-wince-cegcc/include/wchar.h:60: error: conflicts with new declaration with 'C' linkage
I am unable to say what is wrong in the header's functions declaration...

Thanks !

junkie_crew
Blank Cone
Blank Cone
Posts: 35
Joined: 31 Jul 2007 15:28

Re: conflicts with new declaration with 'C' linkage

Postby junkie_crew » 05 Oct 2007 14:46

Alright, a solution would be to use the extern "C" command :

Code: Select all

/* $Id: tcscpy.h 21683 2006-04-21 15:15:18Z peterw $ */ #include <tchar.h> extern "C"{ _TCHAR * _tcscpy(_TCHAR * to, const _TCHAR * from) { _TCHAR *save = to; for (; (*to = *from); ++from, ++to); return save; } }
It compiles this way...


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 32 guests