eclipse不会运行我的exe文件 [英] eclipse won't run my exe file
问题描述
我正在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.-按Run。
如果你需要传递参数到你的程序,请转到参数选项卡。
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屋!