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 to
boost::system::generic_category()' stdafx.cc:(.text+0x48): undefined referenceboost::system::generic_category()' stdafx.cc:(.text+0x54): undefined reference to
boost::system::system_category()' cmakefiles/atfor.dir/main.cc.o: in function__static_initialization_and_destruction_0(int, int)': main.cc:(.text+0x29d): undefined reference to
boost::system::generic_category()' main.cc:(.text+0x2a9): undefined referenceboost::system::generic_category()' main.cc:(.text+0x2b5): undefined reference to
boost::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
Post a Comment