This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Unable to get std::thread working
- From: Ian Lance Taylor <iant at google dot com>
- To: Troy Heron <troy dot heron at hixxy dot org>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 26 May 2009 07:06:11 -0700
- Subject: Re: Unable to get std::thread working
- References: <23720627.post@talk.nabble.com>
Troy Heron <troy.heron@hixxy.org> writes:
> I compiled the gcc 4.4.0 release from source and upon trying execute a simple
> hello world program that uses std::thread I get the following error:
>
> ./t: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required
> by ./t)
>
> All non c++0x aspects of gcc/stdc++ seem to work fine.
>
> I'm sure I've likely done something silly when compiling/installing gcc...
> any ideas?
Most likely your program t is using the libstdc++.so which comes with
the system rather than the libstdc++.so which is part of your newly
installed gcc. This can happen if you configured gcc with a --prefix
option. The simple fix will be to set the LD_LIBRARY_PATH environment
variable to point to the directory holding your libstdc++.so.
Ian