public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* wstring and gcc
@ 2002-09-25 11:30 andy
  2002-09-29 16:16 ` andy
  0 siblings, 1 reply; 6+ messages in thread
From: andy @ 2002-09-25 11:30 UTC (permalink / raw)
  To: gcc-help

I'm running gcc 3.2 on a redhat linux box.

this simple code :
int main()
{
wstring foo;
printf("%s\n",foo.c_str());
return 0;
}

produces the following link error:
"
/tmp/cceNYHXk.o: In function `main':
/tmp/cceNYHXk.o(.text+0x18): undefined reference to
`std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> >::basic_string[in-charge]()'
/tmp/cceNYHXk.o(.text+0x23): undefined reference to
`std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> >::c_str() const'
/tmp/cceNYHXk.o(.text+0x3e): undefined reference to
`std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> >::~basic_string [in-charge]()'
/tmp/cceNYHXk.o(.text+0x51): undefined reference to
`std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> >::~basic_string [in-charge]()'
collect2: ld returned 1 exit status"

since gcc 3.2 is in my home directory, the command line to build the app is
as follows:
/home/andy/tools3.2/H-i686-pc-linux-gnu/bin/gcc -o tstapp test.cpp -static
-lstdc++

Any help in resolving this is greatly appreciated
Andy

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-10-03 19:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-25 11:30 wstring and gcc andy
2002-09-29 16:16 ` andy
2002-09-30  8:15   ` Gokhan Kisacikoglu
2002-10-03  9:21     ` andy
2002-10-03 10:22       ` Gokhan Kisacikoglu
2002-10-03 12:09         ` andy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).