Unable to get std::thread working
Ian Lance Taylor
iant@google.com
Tue May 26 14:12:00 GMT 2009
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
More information about the Gcc-help
mailing list