我试图用C++编译一个相对简单的CMake项目,它以前在另一台计算机上工作,但我最近切换了,它不再能够构建。
当我尝试构建时,CMake给出以下输出:
-- The CXX compiler identification is GNU 6.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/MinGW/bin/c++.exe
-- Check for working CXX compiler: C:/MinGW/bin/c++.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler
"C:/MinGW/bin/c++.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: 'C:/Users/huntd/OneDrive - USU/Code/C++/Learning/Post_Transition/build/CMakeFiles/CMakeScratch/TryCompile-n97xfq'
Run Build Command(s): "C:/Program Files/CMake/bin/cmake.exe" -E env VERBOSE=1 C:/MinGW/bin/mingw32-make.exe -f Makefile cmTC_8b983/fast
mingw32-make.exe: *** INTERNAL: readdir: Invalid argument
. Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
字符串
我已经删除并重新安装了MinGW和CMake,我一直遇到同样的问题.我已经环顾四周类似的错误,我只是不明白出了什么问题.任何帮助将不胜感激.
1条答案
按热度按时间k4emjkb11#
张贴修复,为我工作的那些在未来,安装Msys和安装MinGW通过Msys工作,我不再有问题。