简体   繁体   中英

g++-4.9 on Raspberry Pi 2: undefined reference to `boost::atomics::detail::lockpool::get_lock_for when linking

I used

sudo apt-get install libboost1.55-all

to install the boost library on a Raspberry Pi 2. When I try to link the object files of my application, I get the following error:

In function `scoped_lock': /usr/include/boost/atomic/detail/lockpool.hpp:36: undefined reference to boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'

I read that this is a bug and that there are patches available: https://svn.boost.org/trac/boost/ticket/9041

However, I don't really know how to apply the patch (a step by step explanation would be helpful, i tried "patch p0 < ...") and whether there is a more "elegant" solution.

A patch is applied to the source code before it's build. In your case you are downloading pre-built binaries so the step to apply a patch has passed.

For detailed information on how to apply a patch I found an article apply patch file using patch command

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