gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 06:36:39 26 4
gpt4 key购买 nike

我在尝试在 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com