c++ - Undefined reference to 'boost::system::generic_category()'? -


it seems unable see obvious. wanted use boost library features project , know getting these nice errors of sudden:

linking cxx executable atfor cmakefiles/atfor.dir/stdafx.cc.o: in function __static_initialization_and_destruction_0(int, int)': stdafx.cc:(.text+0x3c): undefined reference toboost::system::generic_category()' stdafx.cc:(.text+0x48): undefined reference boost::system::generic_category()' stdafx.cc:(.text+0x54): undefined reference toboost::system::system_category()' cmakefiles/atfor.dir/main.cc.o: in function __static_initialization_and_destruction_0(int, int)': main.cc:(.text+0x29d): undefined reference toboost::system::generic_category()' main.cc:(.text+0x2a9): undefined reference boost::system::generic_category()' main.cc:(.text+0x2b5): undefined reference toboost::system::system_category()' collect2: error: ld returned 1 exit status

here find cmakelists.txt, headers, , main: http://pastie.org/8231509
can see, tried lot playing around cmakelists , pretty sure have headers project requires. anyways, i've never had such errors before , appreciate suggestions/solutions what's wrong here since don't have ideas left now. thx in advance.

you must explicitly add system library linked program

find_package(boost required components system) #                                      ^^^^^^ :) 

this must done other boost libraries built separately (regex, thread, etc.) (see here).


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -