0

我对 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!
4

1 回答 1

1

问题可能是由 make 删除和创建 helper .bat 文件引起的。在 windows 上,当删除的文件仍然被其他应用程序(防病毒、windows 索引等)引用时,不可能创建同名文件。(C++/Win32:如何等待挂起的删除完成?)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 会好得多。您也可以尝试在您的防病毒软件中破例。

于 2013-03-29T10:45:12.597 回答