gpt4 book ai didi

c++ - 如何解决CLion上的此编译错误?

转载 作者:行者123 更新时间:2023-12-03 07:39:14 27 4
gpt4 key购买 nike

我使用一个称为CLionProjects的主目录,上面有几个目录。最近,我添加了这些目录,以便整理文件。自从我第一次在CLion中安装一个名为“Boletin1”的目录以来,该目录就位于主目录中,后来当我创建“Boletin2”时(在这些目录中我有名为Ejercicio1,Ejercicio2的项目),问题开始出现,我收到此错误消息:
我必须弄清楚,编译器问题仅在“Boletin2”目录上,并且一个名为“Boletin1”的文件正常工作。
我键入调试:

"C:\Program Files\JetBrains\Nueva carpeta\CLion 2020.2.3\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\Users\usuario\Desktop\CLionProjects\Boletín2\Ejercicio1
-- The C compiler identification is GNU 8.1.0
-- Check for working C compiler: C:/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/mingw64/bin/gcc.exe - broken
CMake Error at C:/Program Files/JetBrains/Nueva carpeta/CLion 2020.2.3/bin/cmake/win/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler

"C:/mingw64/bin/gcc.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/usuario/Desktop/CLionProjects/Boletín2/Ejercicio1/cmake-build-debug/CMakeFiles/CMakeTmp

Run Build Command(s):C:/mingw64/bin/mingw32-make.exe cmTC_a9874/fast && C:/mingw64/bin/mingw32-make.exe -f CMakeFiles\cmTC_a9874.dir\build.make CMakeFiles/cmTC_a9874.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/usuario/Desktop/CLionProjects/Bolet�n2/Ejercicio1/cmake-build-debug/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a9874.dir/testCCompiler.c.obj
C:\mingw64\bin\gcc.exe -o CMakeFiles\cmTC_a9874.dir\testCCompiler.c.obj -c C:\Users\usuario\Desktop\CLionProjects\Boletín2\Ejercicio1\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: error: C:\Users\usuario\Desktop\CLionProjects\Boletín2\Ejercicio1\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
mingw32-make.exe[1]: *** [CMakeFiles\cmTC_a9874.dir\build.make:85: CMakeFiles/cmTC_a9874.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/usuario/Desktop/CLionProjects/Bolet�n2/Ejercicio1/cmake-build-debug/CMakeFiles/CMakeTmp'
mingw32-make.exe: *** [Makefile:140: cmTC_a9874/fast] Error 2





CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "C:/Users/usuario/Desktop/CLionProjects/Boletín2/Ejercicio1/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "C:/Users/usuario/Desktop/CLionProjects/Boletín2/Ejercicio1/cmake-build-debug/CMakeFiles/CMakeError.log".

[Failed to reload]
感谢4的支持,甚至阅读此书。

最佳答案

尝试将目录重命名为Boletin1Boletin2 删除所有重音并用无聊的i字母书写,即使您的语言拼写错误。
这是一个编码问题,它的发生是因为在这种情况下,您有3个程序(此处为cmakegcc.exemingw64-make.exe),它们会解析具有不同结果(即BoletÃ�n2Boletín2Boletín2)的相同字符。
您可能还必须重置clion的缓存和/或从IDE中删除项目,然后重新导入它们。它可能已经在缓存中保留了一些路径,并可能尝试将它们提供给cmake

关于c++ - 如何解决CLion上的此编译错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65230767/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com