无法使用msiot/husky在windows中从源代码构建husky
Unable to build husky from source in windows using ms-iot/husky
我正试图在windows中使用repo从源代码构建huskyhttps://github.com/ms-iot/husky/tree/melodic-devel,但当我运行catkin_make_isolated时,windows无法构建它,因为husky使用"unistd.h",而我无法在windows中获取该标头,对此有什么解决办法吗?
错误:===>处理柳絮包装:'husty_base'===>使用env进行构建:'C:\Users\catkin_ws\devel_insolated\husty_msgs\env.bat'Makefile存在,正在跳过显式cmake调用。。。===>在'C:\Users\catkin_ws\build_isolated\husty_base'中设置cmake_check_build_system
Microsoft(R(程序维护实用程序版本14.25.28614.0版权所有(C(Microsoft Corporation。保留所有权利。
===>nmake in'C:\Users\catkin_ws\build_isolated\husty_base'
Microsoft(R(程序维护实用程序版本14.25.28614.0版权所有(C(Microsoft Corporation。保留所有权利。
[11%]已构建目标husty_base__setup_util.py_exec_install_python[17%]正在构建CXX对象CMakeFiles/horizon_legacy.dir/src/horizon_legacy/Logger.cpp.objcl:命令行警告D9002:忽略未知选项"-std=c++11"Logger.cppC: \Users\catkin_ws\src\husky\husky_base\src\horizon_legacy\Logger.cpp(50(:致命错误C1083:无法打开包含文件:'unistd.h':没有这样的文件或目录NMAKE:致命错误U1077:"C:\PROGRA~2\MICROS~1\2019\COMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\cl.exe":返回代码"0x2"停止NMAKE:致命错误U1077:"C:\Program Files(x86(\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\NMAKE.exe":返回代码"0x2"停止NMAKE:致命错误U1077:"C:\Program Files(x86(\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\NMAKE.exe":返回代码"0x2"停止<==无法处理包"husty_base":命令'['C:\Users\catkin_ws\devel_sisolate\husty_msgs\env.bat','nmake']'返回非零退出状态2
通过运行以下程序再现此错误:===>cd'C:\Users\catkin_ws\build_isolated\husty_base'&;'C: \Users\catkin_ws\devel_sisolated\husty_msgs\env.bat'nmake
命令失败,正在退出。
我下载了最新版本的repo,发现文件'\husky myodyc\husty_base\src\horizon_legacy\Logger.cpp'中有一个不匹配的#if/#endif对。我在修改Logger.cpp文件后成功构建了repo。
#include <iostream>
#include <fstream>
#include <signal.h>
#if !defined(_WIN32)
# include <unistd.h>
#else
# include <windows.h>
#endif
- 在VS代码中交叉编译Windows与Linux上的MinGW的SDL程序
- 在Linux for Windows上编译C++代码时出错
- 在Windows上用C++裁剪HBITMAP
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 如何加载(或映射)文件部分的最大大小,但适合在Windows上的RAM
- std::threads可以从Windows DLL中的全局变量创建/销毁吗?
- 当我编译webrtc服务器时,Windows上只支持clang-cl
- 为什么在Windows上的VS 2019和Clang 9中"size_t"在没有标题的情况下工作
- Windows/Cygwin - 不能使用 pybind11 - 犯错误
- Windows 10-使用gtkmm-3.0库和g++[包括再现]的分段故障
- 在Windows中以.exe的形式运行c++
- 为什么包含windows.h会产生语法错误,从而阻止类的实例化?(C2146,C2065)
- 无法在windows控制台中为C++程序提供必要的输入
- 在Windows中查找扬声器输出的当前音量级别
- Windows.h与GLFW.h的接口
- 在 Windows 上,是否可以让 dll 在不使用 PATH 环境变量的情况下在另一个文件夹中查找依赖项?
- 在Linux和C++中的Windows上,散列字符串值会产生不同的输出
- Active Directory:从网络服务帐户下运行的Windows服务调用ADsOpenObject时失败
- c++17文件系统::recursive_directory迭代器()在mac上没有给出这样的目录,但在windows上
- 无法使用Qt Creator在Windows中构建yaml-cpp