1

我必须用 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 上工作)

4

2 回答 2

1

各种答案的总结:

  1. 获取gcc-g++ bindll:请参考 MinGW 的 gcc-g++ 操作页面:http: //www.mingw.org/wiki/InstallationHOWTOforMinGW

  2. 检查位置并在必要时g++.exe将其添加到您的环境变量中。PATH

于 2013-10-31T11:57:18.343 回答
0

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

于 2013-11-28T19:06:05.253 回答