我正在尝试在this page的帮助下用MSYS和MinGW构建谷歌测试。
我在MS Windows10家庭版上安装了MinGW和MSYS。到目前为止,我已经在MSYS终端的Google Test源代码目录中运行了这些命令:
mkdir build
cd build
cmake -G "MSYS Makefiles" ..
makemake命令失败,并显示以下输出:
In file included from c:/MinGW/msys/1.0/home/mkkek/googletest-release-1.10.0/googletest/src/gtest-all.cc:41:
C:/MinGW/msys/1.0/home/mkkek/googletest-release-1.10.0/googletest/src/gtest.cc:86:11: fatal error: crtdbg.h: No such file or directory
86 | # include <crtdbg.h> // NOLINT
| ^~~~~~~~~~
compilation terminated.
make[2]: *** [googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.obj] Error 1
make[1]: *** [googletest/CMakeFiles/gtest.dir/all] Error 2
make: *** [all] Error 2crtdbg.h似乎是一个可视化的C++头文件。我确实安装了Windows10SDK和Visual C++,但是构建系统找不到头文件。
我读过this thread,但那里的提示都没有帮助。
如果能帮上忙我会很感激的。
发布于 2020-04-18 05:21:58
我按照评论中的建议切换到了MSYS2,并且我成功地构建了这个库。
我按照project home page上的说明安装了MSYS2。
https://stackoverflow.com/questions/61279812
复制相似问题