简体   繁体   中英

Linking to Boost thread library fails

I have a serious problem with Boost 1.52.0.

In Eclipse, I always get:

boost/thread/detail/thread.hpp:223: undefined reference to `boost::thread::start_thread()

Of course I'm using lboost_system , and lboost_thread , and lpthread , and lrt , and etc. in the linker library settings.

I'm cross compiling, everything except this is working fine.

What is causing this? How can I investigate? I'm stuck.

Linker command is:

arm-linux-gnueabihf-g++ -L"libs" -L"/usr/arm-linux-gnueabihf/lib" -o "Logics" ./src/Logics_all.o -lpthread -lsqlite3 -lssl -lcrypto -lrt -lboost_system -lboost_thread

If I run:

nm libboost_thread.so | grep start_thread

I got only:

0000b3f0 T _ZN5boost6thread21start_thread_noexceptERKNS_17thread_attributesE
0000b4b0 T _ZN5boost6thread21start_thread_noexceptEv

Thank you.

It finally succeeeds, I downloaded the whole boost library and rebuilt everything.

Now it compiles without any issues.

Thank you for both of you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM