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...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 链表 python 牛客_牛客网《剑指o
- 下一篇: win7系统文件夹属性在哪打开