Re: c++ driver link error in 64bit opensuse

272 views
Skip to first unread message

Stephen Lee

unread,
Sep 12, 2012, 2:21:05 PM9/12/12
to mongod...@googlegroups.com
Could you post how you built it?  Do you have a Makefile or scons script?

I ran...

# pwd
[...]mongo-cxx-driver-v2.2/src/mongo/client/examples
# g++ -I../../../ -o first first.cpp  -L../../../../build -lmongoclient -lboost_system -lboost_thread -lboost_filesystem -lpthread

and first.cpp built just fine.

-Stephen

On Wednesday, September 12, 2012 6:15:19 AM UTC-4, li ning wrote:
OS: opensuse 12.1 x86_64
boost:1.49
build c++ driver is successful(sudo scons install), but fail to building an example: libmongoclient.a(spin_lock.o): undefined reference to symbol 'pthread_yield@GLIBC_2.2.5'
I have tried every version I can found, 2.0,2.1,2.2 none of them can work.

anyone can help?




li ning

unread,
Sep 17, 2012, 3:11:56 AM9/17/12
to mongod...@googlegroups.com
I forget -pthread. It works now. Thanks

Reply all
Reply to author
Forward
0 new messages