【发布时间】:2014-12-27 11:43:42
【问题描述】:
我在尝试在 Eclipse 中运行 c++ 项目时遇到问题。
我找到了几页有解决方案的页面,但没有一个有效。
The program file specified in the launch configuration does not exist
Launch Failed. Binary not found. CDT on Eclipse Helios
程序编译:
08:52:36 **** Build of configuration Debug for project testcpp ****
make all
Building file: ../test.cpp
Invoking: Cross G++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"test.d" -MT"test.d" -o "test.o" "../test.cpp"
Finished building: ../test.cpp
Building target: testcpp.exe
Invoking: Cross G++ Linker
g++ -pthread -o "testcpp.exe" ./test.o
Finished building target: testcpp.exe
08:52:38 Build Finished (took 1s.664ms)
并且文件testcpp.exe 在调试文件夹中,但是当我运行Run as -> Local C/c++ Application 它显示错误Launch Failed. Binary not found.
问题是我只需点击Run 就可以了。
有什么想法吗?
Eclipse 版本:
面向 C/C++ 开发人员的 Eclipse IDE
版本:Luna Service Release 1 (4.4.1) 内部版本号:20140925-1800
平台: Windows 7 64 位。
【问题讨论】:
-
文本“Invoking: Cross G++ Compiler”让我猜测您正在为另一个目标而不是您所在的本机平台制作程序。因此,当您尝试作为“本地应用程序”运行时,它会尝试以本机方式运行程序,但事实并非如此。当您“运行”它时,您可能会在某种模拟器中启动它。请注意,我只是在猜测,因为我已经很多年没有使用过 Eclipse。
-
您使用哪个平台?如果在 windows 上运行 g++,交叉编译可能有意义
-
是的,我在 windows 上运行,目标是跨 g++,因为它是我唯一可以使用 -pthread 运行的。我将使用此信息更新问题。