I am trying to build a project on Windows using MinGW and CMake that uses the Boost library v1.60.0. I was able to successfully build Boost with MinGW with the following:
cd <boost_root>\tools\build
bootstrap.bat gcc
cd ..\..
tools\build\b2.exe --prefix=<boost_install_root> toolset=gcc link=static
Now when I build my application via CMake I do it like this:
add_executable(myApp ... .cpp sources ...)
target_include_directories(myApp <myApp include directory> ${Boost_INCLUDE_DIRS})
target_link_libraries(myApp ${Boost_LIBRARIES})
and I get several errors all almost identical to:
<boost_install_root>/lib/libboost_timer-mgw53-mt-1_60.a(cpu_timer.o):cpu_ timer.cpp:(.text+0x25a): undefined reference to `boost::chrono::steady_clock::now()'
The libraries are all there and are visible from within CMake from what I can tell, so what am I missing?