c++ - 无法在 Eclipse 中作为 C++ 项目运行

标签 c++ eclipse

我在尝试在 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。找不到二进制文件。

问题是我只需单击 Run 就可以了。

有什么想法吗?

Eclipse 版本:

面向 C/C++ 开发人员的 Eclipse IDE

版本:Luna Service Release 1 (4.4.1) 构建 ID:20140925-1800

平台: Windows 7 64 位。

最佳答案

一个廉价的 hack 可能是将您的调试文件夹添加到您的 PATH 环境变量。这样 eclipse 也会检查二进制文件的路径。

如果其他人编写了 makefile(不是 eclipse),那么 eclipse 可能不知道调试路径。尝试指定要启动的完整路径

关于c++ - 无法在 Eclipse 中作为 C++ 项目运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26669846/

相关文章:

c++ - 嵌套数组还是嵌套二维数组?

eclipse - 如何在linux中eclipse上的android项目之前编译.sh

java - Android:将徽章添加到我的应用程序内部的图标

java - 命中断点时设置变量值

android - 链接到自定义谷歌地图

c++ - gc/c++ 在编译中省略 main,在单独的文件中提供 main

c++ - 作为函数指针的静态方法

C++:在哪里编写代码文档:在 .cpp 或 .hpp 文件中?

c++ ifstream只读一个字符串需要同时读入

java - 将 Maven 项目从 Netbeans 迁移到 Eclipse 的有趣时光