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_64boost: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?