首页 > 解决方案 > CMake 编译错误:blueworkforce / bluezero

问题描述

我正在尝试从 Windows 10 中的源代码构建CoppeliaRobotics/bluezero

这样我就可以使用http://www.coppeliarobotics.com/软件的 Python API。

我已经通过 vcpkg 安装了 ZeroMQ,并且还从https://zeromq.org/download/ “下载”了 ZeroMQ

但是我不确定在构建时如何克服这个错误。

当我运行构建命令时

 cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_GUI=ON -DBUILD_EXAMPLES=ON ..

我收到以下错误。

..
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Error at E:/cmake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find ZMQ (missing: ZMQ_LIBRARIES ZMQ_INCLUDE_DIRS) (Required is
  at least version "4.1.4")
Call Stack (most recent call first):
  E:/cmake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindZMQ.cmake:54 (find_package_handle_standard_args)
  CMakeLists.txt:59 (find_package)


-- Configuring incomplete, errors occurred!
See also "C:/Users/admini/bluezero/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/admini/bluezero/build/CMakeFiles/CMakeError.log".

然后 CMakeError.log 说

Determining if the include file pthread.h exists failed with the following output:
Change Dir: C:/Users/admini/bluezero/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_19eab.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28315 for x64

  CheckIncludeFile.c

  Copyright (C) Microsoft Corporation.  All rights reserved.

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_19eab.dir\Debug\\" /Fd"cmTC_19eab.dir\Debug\vc142.pdb" /Gd /TC /errorReport:queue C:\Users\admini\bluezero\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c

C:\Users\admini\bluezero\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1,10): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\Users\admini\bluezero\build\CMakeFiles\CMakeTmp\cmTC_19eab.vcxproj]

CmakeOutPut.log 说

Detecting CXX compiler ABI info compiled with the following output:
Change Dir: C:/Users/admini/bluezero/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_fbd1d.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28315 for x64

  CMakeCXXCompilerABI.cpp

  Copyright (C) Microsoft Corporation.  All rights reserved.

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_fbd1d.dir\Debug\\" /Fd"cmTC_fbd1d.dir\Debug\vc142.pdb" /Gd /TP /errorReport:queue "E:\cmake\share\cmake-3.16\Modules\CMakeCXXCompilerABI.cpp"

  cmTC_fbd1d.vcxproj -> C:\Users\admini\bluezero\build\CMakeFiles\CMakeTmp\Debug\cmTC_fbd1d.exe

我不确定如何继续或进一步排除故障。

标签: c++windowsbuildcmake

解决方案


推荐阅读