[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] wide-char and g++



Hi,

On keskiviikko 17 huhtikuu 2013, Helmut Karlowski wrote:
> Andreas Schwab, 17.04.2013 11:16:34:
> > "Helmut Karlowski" <helmut.karlowski@ish.de> writes:
> >> Why doesn't it find the reference when they are the same?
> > 
> > Because nothing defines it.
> 
> libc does.

C "wcslen" and your C++ "wcslen" have completely different symbol
names.  C++ one is mangled, so C one in libc doesn't match it.

It may be easier if you use "nm" on your C++ compiled object files
to see what are the actual symbol names for the functions included
in it.

The reason for 'extern "C"' and what it does to symbols in C++ code
is well explained here:
http://stackoverflow.com/questions/1041866/in-c-source-what-is-the-effect-
of-extern-c


	- Eero