我试图在clion中编译hello world文件,但是我一直收到这个错误
"C:\Program Files\JetBrains\CLion 2018.3.1\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\Users\NAME\CLionProjects\HelloWorld
CMake Error at C:/Program Files/JetBrains/CLion 2018.3.1/bin/cmake/win/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:523 (file):
file STRINGS file
"C:/Users/NAME/CLionProjects/HelloWorld/cmake-build-debug/CMakeFiles/3.13.1/CompilerIdC/a.exe"
cannot be read. 我该怎么摆脱它?
编辑:
我一直收到以下编译错误:
C:\Program\JetBrains\CLion 2018.3.1\bin\cmake\win\bin\cmake.exe-构建C:\Users\ssez\CLionProjects\HelloWorld\cmake-build-debug -目标HelloWorld - -j 433%链接C可执行文件HelloWorld.exe 2018.3.1\bin\cmake\win\bin\cmake.exe无法打开输出文件HelloWorld权限被拒绝:.exe:错误: ld返回了1个退出状态mingw32-make.exe 3:* HelloWorld.exe错误1 CMakeFiles\HelloWorld.dir\build.make:99:目标'HelloWorld.exe‘失败的配方-make.exe 2CMakeFiles/HelloWorld.dir. for /all Error 2 CMakeFiles\Makefile2:71: Permission for target 'CMakeFiles/HelloWorld.dir d.dir/all’Failingmingw32-make.exehttps://i.stack.imgur.com/UMVk8.pnghttps://i.stack.imgur.com/UMVk8.png错误2 CMakeFiles\Makefile2:83:#en0# for target‘CMakeFiles/HelloWorld.dir d.dir/rule‘failed mingw32-make.exe:* HelloWorld错误2 Makefile:117:目标'HelloWorld’的配方失败
发布于 2018-12-16 22:29:23
在安装了CLion和CLion之后,您是否在CLion中设置了工具链?
File > Settings > Build, Execution, Deployment > Toolchains
CLion通常可以自动检测它所知道的编译器,但是我认为它仍然必须首先被告知要查找哪个编译器。
https://stackoverflow.com/questions/53798559
复制相似问题