|
Boost Users : |
From: Forever Kid (foreverkid3_at_[hidden])
Date: 2006-12-11 00:53:44
I am having a little trouble getting boost to load the
static thread library.
For some reason it wants to load the dynamic library
instead of the static boost_thread library.
Everything compiles and builds, but I get a message
that it can't find the shared library, when I really
want it linked statically. (see below)
What did I miss?
Thanks much for any help,
Graham
Boost version: 1.33.1
OS: Linux 2.6
Compiler: GCC 4.1.1
Compiler command line (debug):
g++ -I/home/quirk/dev/libraries/boost_1_33_1/ -O0 -g3
-Wall -c -fmessage-length=0 -pthread -MMD -MP
-MF"main.d" -MT"main.d" -o"main.o" "../main.cpp"
Linker command line (debug):
g++ -L/home/quirk/dev/libraries/boost_1_33_1/stage/lib
-o"ManagedMakeProject" ./main.o -lpthread
-lboost_thread-gcc-mt-d-1_33_1
Code:
#include <cstdio>
#include "boost/thread/thread.hpp"
void foo()
{
printf("Hello MT World\n");
}
int main(int argc, char* argv[])
{
printf("Hello World\n");
boost::thread aThread(foo);
aThread.join();
return 0;
}
Output:
error while loading shared libraries:
libboost_thread-gcc-mt-d-1_33_1.so.1.33.1: cannot open
shared object file: No such file or directory
____________________________________________________________________________________
Have a burning question?
Go to www.Answers.yahoo.com and get answers from real people who know.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net