我試圖運行一個簡單的Hello世界程序。我在嘗試構建它時遇到此錯誤。這是什麼意思,我該如何解決?我正在使用Windows 7,並且在%PATH%中有MinGW和MSys。Eclipse CDT錯誤:無法編譯
**** Build of configuration Debug for project learn ****
**** Internal Builder is used for build ****
g++ -IC:\MinGW\lib\gcc\mingw32\4.5.2\include\c++ -IC:\MinGW\libexec\gcc\mingw32\4.5.2 -O0 -g3 -Wall -c -fmessage-length=0 -osrc\learn.o ..\src\learn.cpp
g++: CreateProcess: No such file or directory
Build error occurred, build is stopped
Time consumed: 78 ms.
代碼:
#include <iostream>
int main()
{
std::cout << "Hello, world!" << std::endl;
return 0;
}
我的%PATH%是:
C:\Users\Hari>echo %PATH%
C:\Program Files (x86)\MiKTeX 2.8\miktex\bin;C:\sml\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Program Files (x86)\QuickTime\QTSystem\;G:\svn\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\SlikSvn\bin\;C:\cygwin\bin\;C:\Program Files\apache-maven-2.2.1\bin\;C:\PsTools;C:\MinGW\msys\1.0\bin;C:\MinGW\bin
我能夠從運行CMD G ++:
C:\Users\Hari>g++ --version
g++ (GCC) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
沒有代碼沒有餅乾。 – 2011-05-01 08:57:22
bleh ..這是你好世界程序。 k我會添加代碼。 – 2011-05-01 08:59:11
@ Raze2dust,你能編譯這個代碼片段嗎? 「int main(){}」 – 2011-05-01 09:00:57