0
Windows 7. 64位。 CMake 2.8.10。CMake沒有找到提升
步驟:
- 下載升壓:http://sourceforge.net/projects/boost/files/boost/1.51.0/
- 把它C:\工作\ LIB \ boost_1_51_0-MT
- 打開「開始 - >所有程序 - >微軟的Visual Studio 2010 - >的Visual Studio工具 - > Visual Studio命令提示符(2010)」
- 命令:
cd C:\work\lib\boost_1_51_0-MT bootstrap.bat bjam --toolset=msvc-10.0 --variant=release --build-type=complete -j 4 --with-regex --with-test --with-filesystem --with-date_time --with-random --with-system --with-thread --with-program_options --with-chrono --with-math stage link=static threading=multi runtime-link=static
- 命令:
set BOOST_ROOT=C:\work\lib\boost_1_51_0-MT cmake M:\project Unable to find the requested Boost libraries. Boost version: 1.51.0 Boost include path: C:/work/lib/boost_1_51_0-MT The following Boost libraries could not be found: boost_system boost_thread boost_random boost_chrono No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.
M:\項目\的CMakeLists.txt包含:(我需要鏈接提高靜態)
... set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON) set(USE_STATIC_BOOST ON) add_definitions(-DBOOST_THREAD_USE_LIB) add_definitions(-DBOOST_ALL_NO_LIB) find_package(Boost 1.48.0 COMPONENTS system thread random chrono REQUIRED) ...
這是的CMakeLists.txt老並在其他增強裝置上工作(由我而不是過去完成,但收據丟失)。
解決
set(Boost_USE_STATIC_LIBS ON)
...現在的CMake發現Boost庫!雖然我的 「設置(USE_STATIC_BOOST ON)」 必須有同樣的效果,但它不...
會大概是有道理的發佈「解決」部分作爲答案並接受它。 – jogojapan