|
Boost Users : |
Subject: Re: [Boost-users] Problem with boost.system
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-06-23 01:31:48
Robert Bielik wrote:
> I'm using RCF (C++ IPC framework) and get the following link error on linux:
>
> built_components/librcf.a(RCF.o): In function `__static_initialization_and_destruction_0':
> /home/robi/svn/projects/CacheDaemon/src/ext/boost/boost/system/error_code.hpp:205: undefined
> reference to `boost::system::get_system_category()'
> /home/robi/svn/projects/CacheDaemon/src/ext/boost/boost/system/error_code.hpp:206: undefined
> reference to `boost::system::get_generic_category()'
> /home/robi/svn/projects/CacheDaemon/src/ext/boost/boost/system/error_code.hpp:211: undefined
> reference to `boost::system::get_generic_category()'
> /home/robi/svn/projects/CacheDaemon/src/ext/boost/boost/system/error_code.hpp:212: undefined
> reference to `boost::system::get_generic_category()'
> /home/robi/svn/projects/CacheDaemon/src/ext/boost/boost/system/error_code.hpp:213: undefined
> reference to `boost::system::get_system_category()' built_components/librcf.a(RCF.o): In function
> `boost::asio::error::get_system_category()':
> /home/robi/svn/projects/CacheDaemon/src/ext/boost/boost/asio/error.hpp:218: undefined reference to
> `boost::system::get_system_category()' built_components/librcf.a(RCF.o): In function `error_code':
> /home/robi/svn/projects/CacheDaemon/src/ext/boost/boost/system/error_code.hpp:312: undefined
> reference to `boost::system::get_system_category()' built_components/librcf.a(RCF.o): In function
> `RCF::FilterAdapter::onWriteCompleted(unsigned long, int)':
> /home/robi/svn/projects/CacheDaemon/src/ext/rcf/src/RCF/AsioServerTransport.cpp:76: undefined
> reference to `boost::system::get_system_category()' built_components/librcf.a(RCF.o): In function
> `RCF::FilterAdapter::onReadCompleted(RCF::ByteBuffer const&, int)':
> /home/robi/svn/projects/CacheDaemon/src/ext/rcf/src/RCF/AsioServerTransport.cpp:65: undefined
> reference to `boost::system::get_system_category()' collect2: ld returned 1 exit status make[2]:
> *** [built_components/CacheClient] Error 1 make[1]: *** [CMakeFiles/CacheClient.dir/all] Error 2
> make: *** [all] Error 2
>
> And error_code.cpp from boost.system is included AND linked to... besides the whole thing works
> fine on Windows... :(
I recommend you read this:
http://vladimir_prus.blogspot.com/2009/06/linking-101.html
In particular, the note about static linking towards the end might be directly relevant. Although
you did not say how you "included AND linked to" error_code.cpp, so it's impossible to say for sure.
- Volodya
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net