eclipse不会运行我的exe文件 [英] eclipse won't run my exe file

查看:565
本文介绍了eclipse不会运行我的exe文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Eclipse中构建和运行我的C ++程序,但它不会工作。我的程序没有主函数,但它有WinMain, windows.h>。我编译成一个可执行文件,一切正常,但当我点击运行没有发生任何事情。当我拖动可执行文件到我的桌面,双击它运行没有问题。但我想能够从Eclipse直接运行它。

I'm trying to build and run my C++ program in eclipse but it won't work. My program doesn't have a main function, but it does have WinMain and includes < windows.h >. I compile it into an executable and everything works fine, but when I click "run" nothing happens. When I drag the executable to my desktop and double click it it runs no problem. But I would like to be able to run it directly from eclipse.

我已经做了一些研究,并已经尝试过以下操作:

I've done some research and already tried the following:

我确保PE Windows Parser

I made sure "PE Windows Parser" is checked in "Binary Parsers."

我确保工作目录是可执行文件所在的位置(workspace / projectname / Release)。

I made sure the working directory is where the executable is (workspace/projectname/Release).

我确保MinGW在PATH中(我找不到msys,但一切都编译正常,所以我不认为这是问题)。

I made sure MinGW is in the PATH (I couldn't find msys, but everything is compiling fine so I don't think this is the problem).

任何想法?

推荐答案

1.-转到菜单运行 - >运行配置

1.- Go to Menu Run -> Run Configurations

2.-在左侧子窗口中双击C / C ++应用程序。

2.- Double click over C/C++ Application in the left subwindow.

3.-在右边子窗口中,按下Search_Project按钮检查您的二进制可执行文件。

3.- At right subwindow, press button Search_Project and check your binary executable.

4.-按运行。

如果需要将参数传递给程序,请转到参数标签。

If you need to pass arguments to your program, go to Arguments tab.

下次运行时,您可以使用PLAY工具栏按钮或使用CTRL + F11。

For next runs, you can use the PLAY toolbar button or use CTRL+F11.

>

这篇关于eclipse不会运行我的exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆