我刚刚在我的 win7 x64 机器上安装了 cygwin 和 eclipse,从 svn 导入我的代码后,我得到了这个奇怪的错误:
**** Build of configuration Default for project platform ****
make all
g++ -O2 -g -Wall -fmessage-length=0 -c -o platform.o platform.cpp
process_begin: CreateProcess(C:\cygwin\bin\g++.exe, g++ -O2 -g -Wall -fmessage-length=0 -c -o platform.o platform.cpp, ...) failed.
make (e=5): Access is denied.
make: *** [platform.o] Error 5
我试过以管理员身份运行 eclipse,但这没有任何区别。任何线索如何解决这个问题?
我的 Windows PATH 变量是 C:\WinAVR-20100110\bin;C:\WinAVR-20100110\utils\bin;c:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jre6\bin\;C:\cygwin\bin
最佳答案
C:\cygwin\bin\g++.exe 是指向 g++-3.exe 或 g++-4.exe 的 Cygwin 符号链接(symbolic link)。尽管 CreateProcess() 等 native Windows 函数不理解 Cygwin 符号链接(symbolic link)。因此需要配置Eclipse直接执行g++-3.exe或g++-4.exe。
关于c++ - eclipse编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3774825/