I successfully switched to Linux, and I really start to love it. Except that I can't link code against Boost libraries that are non-header only.
Steps that I have taken:
- Run
sudo apt-get install libboost.*-dev
in terminal to install the Boost 开发者_开发技巧libraries - Let CMake generate my make-files and locate the Boost libraries as I have done it on Windows.
- Run
make
to compile.
The same code compiles and link fine under Windows with Microsoft Visual C++.
Further information
- Console Output
- Source
What else do I need to do?
From your output and your CMakeFiles it doesn't look like you are linking your code to the Boost filesystem library.
That is,
target_link_libraries(RCMeta ${Boost_FILESYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY})
Note: I may have the variable name wrong for that library you may have to double check it.
You can also use the generic ${Boost_LIBRARIES}
variable,
target_link_libraries(RCMeta ${Boost_LIBRARIES})
for your RCMeta library.
精彩评论