我对CMake很新,当我尝试编译时,我得到以下输出。我整天都在这里无济于事 - 有没有人有这方面的经验?相关目录和文件的权限似乎很好。任何帮助非常感谢!感谢
The C compiler identification is GNU 4.6.2
The CXX compiler identification is GNU 4.6.2
Check for working C compiler: C:/MinGW/bin/gcc.exe
Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test
program.
It fails with the following output:
Change Dir: C:/buildtemp/CMakeFiles/CMakeTmp
Run Build Command:C:/MinGW/bin/mingw32-make.exe
"cmTryCompileExec2665670929/fast"
C:/MinGW/bin/mingw32-make.exe -f
CMakeFiles\cmTryCompileExec2665670929.dir\build.make
CMakeFiles/cmTryCompileExec2665670929.dir/build
process_begin: CreateProcess(C:\MinGW\bin\mingw32-make.exe,
C:/MinGW/bin/mingw32-make.exe -f
CMakeFiles\cmTryCompileExec2665670929.dir\build.make
CMakeFiles/cmTryCompileExec2665670929.dir/build, ...) failed.
make (e=5): Access is denied.
mingw32-make.exe: *** [cmTryCompileExec2665670929/fast] Error 5
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
Configuring incomplete, errors occurred!
答案 0 :(得分:1)
probem可能是由make删除和创建帮助.bat文件引起的。 在Windows上,当删除的文件仍被其他应用程序(防病毒,Windows索引等)引用时,无法创建具有相同名称的文件。 (C++/Win32: How to wait for a pending delete to complete?) Make对新创建的.bat文件使用相同的名称作为刚刚删除的文件,并收到“DELETE PENDING”错误。
Date & Time: 29.3.2013 11:11:14
Event Class: File System
Operation: IRP_MJ_CREATE
Result: DELETE PENDING
Path: D:\<truncated>\Debug\make6436-1.bat
TID: 6120
Duration: 0.0000149
Desired Access: Generic Read/Write
Disposition: Create
Options: Synchronous IO Non-Alert, Non-Directory File
Attributes: NT
ShareMode: None
AllocationSize: 0
因此禁用防病毒会有所帮助,但修复make会更好。您也可以尝试在防病毒软件中例外。