This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: link troubles with wcslen
- From: Shankar Unni <shankar at cotagesoft dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 28 Oct 2002 10:10:26 -0800
- Subject: Re: link troubles with wcslen
- References: <005701c27e1e$54e86430$0100a8c0@xavier>
On 10/27/2002 5:07 PM, Xavier Pianet wrote:
I can only manage to get errors :
/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccDaW1wr.o(.text+0x38):Blah.cc:
undefined reference to `wcslen(wchar_t const*)'
This looks like the "wcslen" declaration isn't being protected by an
'extern "C"' block.
I notice that you're compiling "Blah.cc" with "gcc" instead of "g++". In
1.3.12 (I'm still on this, which uses gcc 2.95.3), this seems to work: I
can compile the sample program with "gcc wcslen.cc", and it uses C++
compilation rules throughout to compile.
What the above error seems to suggest is that the "gcc foo.cc" seems to
*preprocess* the source as if it were C (thus not expanding the
BEGIN_DECLS and END_DECLS macros to extern "C" {, etc.), but is
*compiling* them as C++ (generating mangled external names).
Xavier: can you do the compilation using "-v" and post the output as an
attachment? ("gcc -v -o Blah Blah.cc")
--
Shankar.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/