日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux cmake变量,linux – CMake错误:此项目中使用了以下变量,但它们设置为NOTFOUND...

發布時間:2025/3/11 linux 96 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux cmake变量,linux – CMake错误:此项目中使用了以下变量,但它们设置为NOTFOUND... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我正在嘗試使用tar文件whalebot-0.02.00.tar.gz配置whalebot爬蟲.我已正確提取它:

root@Admin1:~/dls# tar xvzf whalebot-0.02.00.tar.gz

之后我想配置它:

root@Admin1:~/dls/whalebot# ./configure

它給了我錯誤:

bash: ./configure: No such file or directory

我也運行了命令:

root@Admin1:~/dls/whalebot# cmake ./

它給了我以下結果:

root@Admin1:~/dls/whalebot# cmake ./

-- The C compiler identification is GNU

-- The CXX compiler identification is GNU

-- Check for working C compiler: /usr/bin/gcc

-- Check for working C compiler: /usr/bin/gcc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Boost version: 1.44.0

-- Found the following Boost libraries:

-- filesystem

-- system

-- thread

-- program_options

-- date_time

CMake Warning (dev) at webspider/CMakeLists.txt:25 (link_directories):

This command specifies the relative path

../statsem_string/bin

as a link directory.

Policy CMP0015 is not set: link_directories() treats paths relative to the

source dir. Run "cmake --help-policy CMP0015" for policy details. Use the

cmake_policy command to set the policy and suppress this warning.

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at webspider/CMakeLists.txt:25 (link_directories):

This command specifies the relative path

../3dparty/google-url

as a link directory.

Policy CMP0015 is not set: link_directories() treats paths relative to the

source dir. Run "cmake --help-policy CMP0015" for policy details. Use the

cmake_policy command to set the policy and suppress this warning.

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

Please set them or make sure they are set and tested correctly in the CMake files:

HTMLCXX_LIBRARY

linked by target "whalebot" in directory /root/dls/whalebot/webspider

-- Configuring incomplete, errors occurred!

我該怎么辦?

解決方法:

看來CMake無法找到htmlcxx庫.

cd

./configure --enable-static=on --enable-shared=off

make

sudo make install

您可能需要添加#include< cstddef>到html / tree.h的頂部,讓它成功構建.它將默認安裝到usr / local /.

如果您還沒有安裝icu,還需要安裝icu:

sudo apt-get install libicu-dev

最后,您現在可以構建和安裝whalebot.同樣,如果您有合理的最新boost安裝,則可能會失敗.

在webspider / src / webspider_options.cpp的第57行中,您需要使用boost :: filesystem :: initial_path().string()替換boost :: filesystem :: initial_path().native_directory_string().然后你應該很好地構建和安裝:

cd

mkdir build

cd build

cmake .. -DCMAKE_BUILD_TYPE=Release

make

sudo make install

這也將默認安裝到usr / local /.

標簽:linux,cmake,configure

來源: https://codeday.me/bug/20190626/1290362.html

總結

以上是生活随笔為你收集整理的linux cmake变量,linux – CMake错误:此项目中使用了以下变量,但它们设置为NOTFOUND...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。