I am trying to include Boost libraries in my project and run into problems in the same. I am on Ubuntu 12.10 with the Codeblocks IDE and tried to install the libraries manually by reading the instructions from the site, but I got an error with the header, as well as with libraries that must be built in before use.
Then I installed the libraries via terminalby sudo apt-get install libboost-all-dev . After that, in my Codeblocks programs, I can include headers like #include <boost/regex.hpp> , but when I try to include a header for the file system library ( #include "boost/filesystem/operations.hpp" ), I get the following error :
/usr/include/boost/system/error_code.hpp|214|undefined reference to boost::system::generic_category()'|
I am not sure how to resolve this error (especially in Codeblocks on Linux). I really could help here.
Compiler: Gcc
Program code: I tried only the specified operations.hpp file system file.
Assembly block of code blocks:
Build started on: 20-11-2012 at 18:02.53 Build ended on: 20-11-2012 at 18:02.54 -------------- Build: Debug in libopenFrameworks --------------- Target is up to date. -------------- Build: Debug in reader1 --------------- make -s -f Makefile Debug linking i686 bin/reader1_debug linux obj/i686Debug/src/testApp.o: In function `__static_initialization_and_destruction_0': /usr/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()' /usr/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()' /usr/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()' obj/i686Debug/src/main.o: In function `__static_initialization_and_destruction_0': /usr/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()' /usr/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()' /usr/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()' collect2: ld returned 1 exit status make: *** [bin/reader1_debug] Error 1 Process terminated with status 2 (0 minutes, 1 seconds) 6 errors, 0 warnings
c ++ boost linux codeblocks
Cipher Nov 20 '12 at 5:24 2012-11-20 05:24
source share