I've two computer, one with ubuntu 12.04, one with 13.04, and both with codeblocks 12.11.
If I compile with this shell script
g++ -g -I/home/user/boost_1_50_0 -c main.cpp -o main.o
g++ main.o /home/user/boost_1_50_0/bin.v2/libs/program_options/build/gcc-4.6/release/link-static/threading-multi/libboost_program_options.a /home/user/boost_1_50_0/bin.v2/libs/system/build/gcc-4.6/release/link-static/threading-multi/libboost_system.a /home/user/boost_1_50_0/bin.v2/libs/filesystem/build/gcc-4.6/release/link-static/threading-multi/libboost_filesystem.a /home/user/boost_1_50_0/bin.v2/libs/chrono/build/gcc-4.6/release/link-static/threading-multi/libboost_chrono.a -lrt -o software.out
everything works fine on both the computers, but if I set those 4 file in "link libraries", set the correct directory in "search directories", only in the 13.04 machine it works (without setting -lrt!), while on the 12.04 machine I get
In function `boost::chrono:: system_clock::now(): chrono.cpp:
undefined reference to `clock_gettime' error.
and if I try to set -lrt option in "other linker settings", or in "other settings -> advanced options -> command line macro" directly in the command, I always get this error. What's the problem? I tried with g++ 4.6, 4.7, gcc too...