由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - boost drives me crazy!! Question!
相关主题
thread c++ 问题how many ways in C++ to release a mutex?
c++ thread 求助C++的一个mutex问题
面试问题一问 (转载)VC++线程问题
c++ multi-thread 一问,Any examples for implementing user-level threads library in C?
精华区翻出来的MS老题,thread safec++多线程的工作面试一般会问哪些问题?
boost thread 里的 shared_mutex 和 readwrite_lock 有什么区别?pthread mutex能不能用与thread和process之间
looking for c++ programmers怎么练习C++ multi-threading?
请教 boost lockslinux下, 一个thread 正在写文件,如果另一个thread试图去删去这个文件
相关话题的讨论汇总
话题: boost话题: thread话题: mutex话题: gcc41话题: lboost
进入Programming版参与讨论
1 (共1页)
m******h
发帖数: 1059
1
Hi,
I wanted to use the thread functions of boost,
here is the program
#include
#include
int main()
{
boost::mutex m;
return 0;
}
and I'm using g++ to compile, with these options
-L/root/boost/lib -lboost_thread-gcc41-mt-1_37 -static
The error message is:
undefined reference to `boost::mutex::mutex()'
I actually got the similar problem the day before yesterady for date_time
but the issue was resolved by adding
-lboost_date_time-gcc41-mt-
y*******g
发帖数: 6599
2
我用 g++ mutex.cpp -L /usr/local/lib/ -l boost_thread-gcc42-mt
编译通过.

【在 m******h 的大作中提到】
: Hi,
: I wanted to use the thread functions of boost,
: here is the program
: #include
: #include
: int main()
: {
: boost::mutex m;
: return 0;
: }

m******h
发帖数: 1059
3
谢谢!还帮我测试了一下
不过我现在更郁闷了,这到底是什么问题啊

【在 y*******g 的大作中提到】
: 我用 g++ mutex.cpp -L /usr/local/lib/ -l boost_thread-gcc42-mt
: 编译通过.

r*********r
发帖数: 3195
4
the option -static is what's wrong.
d***q
发帖数: 1119
5
你的thread 是编译成什么库德
.so? .dll 还是 一般的.a
不一样的。
m******h
发帖数: 1059
6
no, even without -static, still the same error
1 (共1页)
进入Programming版参与讨论
相关主题
linux下, 一个thread 正在写文件,如果另一个thread试图去删去这个文件精华区翻出来的MS老题,thread safe
[bssd]这段代码有什么问题boost thread 里的 shared_mutex 和 readwrite_lock 有什么区别?
Undefined symbols for architecture x86_64: 求助looking for c++ programmers
如果一个程序的makefile里-c改成-g就链接出错请教 boost locks
thread c++ 问题how many ways in C++ to release a mutex?
c++ thread 求助C++的一个mutex问题
面试问题一问 (转载)VC++线程问题
c++ multi-thread 一问,Any examples for implementing user-level threads library in C?
相关话题的讨论汇总
话题: boost话题: thread话题: mutex话题: gcc41话题: lboost