[c++] undefined reference to boost::system::system_category() when compiling

I'm trying to compile a program on Ubuntu 11.10 that uses the Boost libraries. I have the 1.46-dev Boost libraries from the Ubuntu Repository installed, but I get an error when compiling the program.

undefined reference to boost::system::system_category()

What is it that I do wrong?

This question is related to c++ boost

The answer is


The boost library you are using depends on the boost_system library. (Not all of them do.)

Assuming you use gcc, try adding -lboost_system to your compiler command line in order to link against that library.


Similar questions with c++ tag:

Similar questions with boost tag: