CMake搜尋Boost1 57失敗及解決

2021-06-28 07:36:55 字數 622 閱讀 4776

cmake更新到3.1.0,boost更新到1.57,結果cmake搜尋boost失敗:

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.

已設定環境變數 boost_root = c:\boost

檢視 findboost.cmake 指令碼,發現它僅搜尋已知的版本,而最新版 1.57 還未新增:

set(_boost_known_versions $

"1.56.0" "1.56" "1.55.0" "1.55" "1.54.0" "1.54"

"1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"

"1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1"

新增 「1.57」 後即成功。

findboost.cmake 應該新增 boost 未來版本才好。

怎樣在VS2013中安裝配置boost 1 55

boost是乙個和stl類似的標準庫,但它擴充了stl使得泛型的優點發揮到最佳。因此現在boost比stl更為實用。既然boost這麼實用,那麼怎麼去在windows環境下去安裝boost庫呢?下面分享一下我用vs2013配置boost 1 55 0庫的操作 解壓boost檔案到本地目錄 如g bo...

cmake中boost庫找不到問題

有時候需要用到boost庫,在cmake中怎麼配置都很清楚,但是其中有乙個小坑需要注意。這個坑有點低階,但是有時候人們就是不知道沒電是因為插排沒插到插座上。boost庫可能我們編譯的時候選擇了64位或者32位。cmake在生成的時候預設是32位,如果cmake生成選擇32位而boost庫只提供了64...

cmake使用指定目錄的boost庫

set boost root your path your path指的是你要指定的目錄 可以再新增以下內容列印是否確實使用了指定目錄的boost庫 if boost found message status boost include dirs message status boost libra...