Noob question - undefined reference to boost::system::get_system_category
I'm a relatively new to programming on Linux, previous experience was with
VB.net in Windows. I'm trying to make the switch to C++, but I'm having a
difficult time. I started to follow one of the basic tutorials for Boost
ASIO, but I can't get it to compile with the ASIO.hpp file included. The
environment is Kubuntu 9.04 and Kdevelop 3.5.3.
Code:
----------------
#include
AMDG mx270a wrote:
I'm a relatively new to programming on Linux, previous experience was with VB.net in Windows. I'm trying to make the switch to C++, but I'm having a difficult time. I started to follow one of the basic tutorials for Boost ASIO, but I can't get it to compile with the ASIO.hpp file included. The environment is Kubuntu 9.04 and Kdevelop 3.5.3.
Code: ---------------- #include
int main() { return 0; } ----------------
Compile Messages and Errors: <snip> /usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_system_category()'
You'll need to follow the instructions at http://tinyurl.com/ypdqsh and build the boost system library. In Christ, Steven Watanabe
mx270a wrote:
ts1.o: In function `__static_initialization_and_destruction_0': /usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_system_category()'
How do I resolve the boost::system errors?
Thanks, Lance
Lance - You need to link against the boost system library also. Michael -- ---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com
Michael Caisse-2 wrote:
You need to link against the boost system library also.
How do I do that? I tried adding #include
mx270a wrote:
Michael Caisse-2 wrote:
You need to link against the boost system library also.
How do I do that? I tried adding #include
to the program, but there is no file by that name. -Lance
Lance - You need to *link* the system library. For example, it might be called libboost_system-gcc43-mt-1_37.so. See Steven's response which pointed you toward the Getting Started guide. Michael -- ---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com
You need to *link* the system library. For example, it might be called libboost_system-gcc43-mt-1_37.so.
See Steven's response which pointed you toward the Getting Started guide.
Alternatively it's possible to use the non-boost asio, which is header-only: http://blog.think-async.com/2008/05/boostasio-vs-asio.html
participants (4)
-
Igor R
-
Michael Caisse
-
mx270a
-
Steven Watanabe