C++ Boost: undefined reference to boost::system::generic_category()

You should link in the libboost_system library. I am not sure about codeblocks, but the g++ command-line option on your platform would be

-lboost_system


Depending on the boost version libboost-system comes with the -mt suffix which should indicate the libraries multithreading capability.

So if -lboost_system cannot be found by the linker try -lboost_system-mt.


It's a linker problem. Include the static library path into your project.

For Qt Creator open the project file .pro and add the following line:

LIBS += -L<path for boost libraries in the system> -lboost_system

In my case Ubuntu x86_64:

LIBS += -L/usr/lib/x86_64-linux-gnu -lboost_system

For Codeblocks, open up Settings->Compiler...->Linker settings tab and add:

boost_system

to the Link libraries text widget and press OK button.