This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc 3.2 string<wchar_t> link problem


Hello all,

Having happily upgraded my Cygwin to include gcc 3.2, I've
encountered a show-stopper: The linker can't resolve symbols
involving wide C++ strings. Here is an example:

#include <string>
#include <iostream>
using namespace std;

int main(int argc,char *argv[])
{
std::string<wchar_t> test;
}

-----------------

$ g++ test.cpp
/cygdrive/c/DOCUME~1/nigels/LOCALS~1/Temp/ccHP4AMl.o(.text+0x25):test.cpp: undefined reference to `std::basic_string<wch
ar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string[in-charge]()'
/cygdrive/c/DOCUME~1/nigels/LOCALS~1/Temp/ccHP4AMl.o(.text+0x30):test.cpp: undefined reference to `std::basic_string<wch
ar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string [in-charge]()'
collect2: ld returned 1 exit status

---------------------------

Any hints, suggestions, or duh-read-the FAQ responses, appreciated.

Note that the following compiles & links:

int main(int argc,char *argv[])
{
std::string<double> test;
}

----------------

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with: /netrel/src/gcc-3.2-3/configure --enable-languages=c,c++,f77,java --enable-libgcj --enable-threads=posi
x --with-system-zlib --enable-nls --without-included-gettext --enable-interpreter --disable-sjlj-exceptions --disable-ve
rsion-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable
-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecd
ir=/usr/sbin
Thread model: posix
gcc version 3.2 20020927 (prerelease)

Cheers,

Nigel Stewart



--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]