无法运行程序“g ++”:启动失败 - Eclipse C ++

时间:2013-10-31 09:07:01

标签: c++ windows eclipse mingw

我必须使用OpenCV做一些项目。我下载了Eclipse,用CDT升级了它,使用了MinGW和链接的OpenCV库。但我仍然无法推出单一节目!

01:27:48 **** Rebuild of configuration Debug for project Detector ****
Info: Internal Builder is used for build
g++ "-IC:\\opencv\\build\\include" "-IC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\include" "-IC:\\MinGW\\mingw32\\lib\\gcc\\mingw32\\4.8.1\\include" "-IC:\\MinGW\\mingw32\\include" "-IC:\\MinGW\\include" "-IC:\\opencv\\build\\include\\opencv" "-IC:\\opencv\\build\\include\\opencv2" "-IC:\\opencv\\include" "-IC:\\opencv\\include\\opencv" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\main.o" "..\\src\\main.cpp" 
Cannot run program "g++": Launching failed

Error: Program "g++" not found in PATH
PATH=[C:\MinGW\bin;C:\MinGW\msys\1.0\binC:/Program Files (x86)/Java/jre7/bin/client;C:/Program Files (x86)/Java/jre7/bin;C:/Program Files (x86)/Java/jre7/lib/i386;C:\Program Files (x86)\EasyPHP-DevServer\binaries\php\php_runningversion;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Bitvise SSH Client;C:\opencv\build\bin\;C:\opencv\build\x86\vc10\bin\;C:\opencv\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Java\jre7\bin\;C:\eclipseCPP\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Bitvise SSH Client;C:\opencv\build\bin\;C:\opencv\build\x86\vc10\bin\;C:\opencv\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Java\jre7\bin\;C:\eclipseCPP]

有人可以告诉我,问题出在哪里? (我在Windows上工作)

2 个答案:

答案 0 :(得分:1)

各种答案摘要:

  1. 获取gcc-g++ bindll:请参阅MinGW for gcc-g ++的页面方式:http://www.mingw.org/wiki/InstallationHOWTOforMinGW

  2. 检查g++.exe位置,如有必要,将其添加到环境变量PATH

答案 1 :(得分:0)

安装MinGW后,仍然需要在MinGW中安装gcc和g ++编译器。