簡體   English   中英

Cmake找不到Boost文件夾

[英]Cmake can't find Boost Folder

我正在使用Windows 7 - 64位,我正在嘗試構建一個項目。 當我使用cmake時,我得到了錯誤

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoos
t.cmake:1191 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  src/CMakeLists.txt:310 (find_package)


CMake Error at src/CMakeLists.txt:312 (message):
  Boost C++ libraries not found.  Please install or try setting BOOST_ROOT

我已將變量設置為BOOST_ROOT到D:\\ MyProject \\ boost_1_43_0 \\ boost \\但我仍然得到這個。 我該如何解決這個問題。

將boost添加到項目的子文件夾中並不是定位增強的標准CMake實踐。 我已經在程序文件中安裝了x64 - MSVC 2010,CMake會自動找到它。

Boost_DIR : C:/Program Files/Boost/share/cmake/boost
Boost_INCLUDE_DIR : C:/Program Files/Boost/include

您也可以嘗試在系統環境變量級別設置Boost_DIR。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM