public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: andy <andy@softbook.com>
To: <gcc-help@gcc.gnu.org>
Subject: Re: wstring and gcc
Date: Sun, 29 Sep 2002 16:16:00 -0000	[thread overview]
Message-ID: <B9BCC094.6F60%andy@softbook.com> (raw)
In-Reply-To: <B9B74EB2.6E92%andy@softbook.com>

No responses so far. Nobody knows or wrong list?
If the latter, where should I post it ?
Thx
Andy

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

  reply	other threads:[~2002-09-29 23:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-25 11:30 andy
2002-09-29 16:16 ` andy [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B9BCC094.6F60%andy@softbook.com \
    --to=andy@softbook.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).