环境:Windows 10 x64,Visual Studio 2017社区(在视频之后安装了c++模块),cuda 10.2.89,cudnn 7.6.5,cmake 3.16-rc3,openpose-1.5.0。
按照官方的README文档和recommended video,我尝试使用python api构建openpose。
不幸的是,当我尝试使用Cmake(版本3.16)配置或构建openpose-1.5.0的源代码时,我遇到了
一个问题。
下面有一些在cmake中设置为NOTFOUND的变量,我无法解决。
我检查了“WITH_PYTHON”选项,所以有一些有关“BOOST”的信息。如果我不检查,它将消失。
我尝试安装boost-1.66.0并将其添加到路径中,但是它不起作用。
错误信息在这里:

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:
BOOST_FILESYSTEM_LIB_RELEASE
    linked by target "openpose" in directory C:/code/source_code/openpose-1.5.0/src/openpose
    linked by target "Calibration" in directory C:/code/source_code/openpose-1.5.0/examples/calibration
    linked by target "OpenPoseDemo" in directory C:/code/source_code/openpose-1.5.0/examples/openpose
    linked by target "pyopenpose" in directory C:/code/source_code/openpose-1.5.0/python/openpose
    ...
BOOST_SYSTEM_LIB_RELEASE
    linked by target "openpose" in directory C:/code/source_code/openpose-1.5.0/src/openpose
    linked by target "Calibration" in directory C:/code/source_code/openpose-1.5.0/examples/calibration
    linked by target "OpenPoseDemo" in directory C:/code/source_code/openpose-1.5.0/examples/openpose
    linked by target "pyopenpose" in directory C:/code/source_code/openpose-1.5.0/python/openpose
    ...
Caffe_LIB
    linked by target "openpose" in directory C:/code/source_code/openpose-1.5.0/src/openpose
    linked by target "Calibration" in directory C:/code/source_code/openpose-1.5.0/examples/calibration
    linked by target "OpenPoseDemo" in directory C:/code/source_code/openpose-1.5.0/examples/openpose
    linked by target "pyopenpose" in directory C:/code/source_code/openpose-1.5.0/python/openpose
    ...
Caffe_Proto_LIB
    linked by target "openpose" in directory C:/code/source_code/openpose-1.5.0/src/openpose
    linked by target "Calibration" in directory C:/code/source_code/openpose-1.5.0/examples/calibration
    linked by target "OpenPoseDemo" in directory C:/code/source_code/openpose-1.5.0/examples/openpose
    linked by target "pyopenpose" in directory C:/code/source_code/openpose-1.5.0/python/openpose
    ...
GFLAGS_LIBRARY_DEBUG
    linked by target "openpose" in directory C:/code/source_code/openpose-1.5.0/src/openpose
    linked by target "Calibration" in directory C:/code/source_code/openpose-1.5.0/examples/calibration
    linked by target "OpenPoseDemo" in directory C:/code/source_code/openpose-1.5.0/examples/openpose
    linked by target "pyopenpose" in directory C:/code/source_code/openpose-1.5.0/python/openpose
    ...
GFLAGS_LIBRARY_RELEASE
    linked by target "openpose" in directory C:/code/source_code/openpose-1.5.0/src/openpose
    linked by target "Calibration" in directory C:/code/source_code/openpose-1.5.0/examples/calibration
    linked by target "OpenPoseDemo" in directory C:/code/source_code/openpose-1.5.0/examples/openpose
    linked by target "pyopenpose" in directory C:/code/source_code/openpose-1.5.0/python/openpose
    ...
GLOG_LIBRARY_DEBUG
    linked by target "openpose" in directory C:/code/source_code/openpose-1.5.0/src/openpose
    linked by target "Calibration" in directory C:/code/source_code/openpose-1.5.0/examples/calibration
    linked by target "OpenPoseDemo" in directory C:/code/source_code/openpose-1.5.0/examples/openpose
    linked by target "pyopenpose" in directory C:/code/source_code/openpose-1.5.0/python/openpose
    ...
GLOG_LIBRARY_RELEASE
    linked by target "openpose" in directory C:/code/source_code/openpose-1.5.0/src/openpose
    linked by target "Calibration" in directory C:/code/source_code/openpose-1.5.0/examples/calibration
    linked by target "OpenPoseDemo" in directory C:/code/source_code/openpose-1.5.0/examples/openpose
    linked by target "pyopenpose" in directory C:/code/source_code/openpose-1.5.0/python/openpose
    ...
OpenCV_LIBS
    linked by target "openpose" in directory C:/code/source_code/openpose-1.5.0/src/openpose
    linked by target "Calibration" in directory C:/code/source_code/openpose-1.5.0/examples/calibration
    linked by target "OpenPoseDemo" in directory C:/code/source_code/openpose-1.5.0/examples/openpose
    linked by target "pyopenpose" in directory C:/code/source_code/openpose-1.5.0/python/openpose
    ...
因为文本太长,所以我用...代替了一些重复的信息。
感谢大家的回答!

最佳答案

在“3rdparty”文件夹中,放入caffe,caffe3rd和opencv的文件(要注意版本!)。然后解压缩
到适当的文件夹。
(这是“getxxx.bat”的工作,但是运行后它将删除存档,导致camke在配置时重新下载它。请不要删除存档)
请参阅“getxxx.bat”的代码以获取解压缩文件夹的名称。
否则,它提示将某些变量设置为NOTFOUND。

关于c++ - CMake错误:在Windows 10上配置或构建openpose时出现变量NOTFOUND,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/62932526/

10-12 23:56