在Eclipse中运行C++程序出现"Launch failed. Binary not foud"

When we are using CDT to write C++ in Eclipse, you may encounter the following error: (I've set up a new C++ Hello World project)

Binary not found Or Program file not Specified

So how can we solve it?

1. Right click the project, Properties->C/C++ Build->Settings->Binary Parser, Click on "PE Windows Parser" if you are a Windows user.

2. Now in the Run configurations, you can choose your C/C++ Application (At first you may not find the binaries to run because eclipse does not know how to run this binary)

上面解决办法中的第1步,好理解,而且也设置了,但第2步没太理解,因为没有出现如上图中的对话框界面。

后来仔细研究了下"Program file not Specified"问题含义,意思是说运行程序没有指定。

我的理解是在eclipse中没有指定*.exe运行程序。

在上面的第2步中,在test Default界面(即运行配置界面中)下,在C/C++ Appliaction一栏中点击Browse按钮,在项目工程目录下,找到Debug目录,然后选择test.exe文件(我的程序名是这个名字,应该是跟工程名一样的),确定后,点击应用并运行,可以了~~~

果然是因为在eclipse中没有指定运行程序的原因。

参考http://hi.baidu.com/jimmyzzxhlh/blog/item/b8dd0d1e72d2bfff1bd57690.html
http://blog.csdn.net/reille/article/details/6741197

猜你喜欢

转载自strutsliu.iteye.com/blog/1568172