eclipse won't run my exe file

前端 未结 2 988
孤街浪徒
孤街浪徒 2021-01-24 18:16

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

相关标签:
2条回答
  • 2021-01-24 18:39

    1.- Go to Menu Run -> Run Configurations

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

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

    4.- Press Run.

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

    enter image description here

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

    enter image description here

    0 讨论(0)
  • 2021-01-24 18:44

    Change your compiler to Visual C++ instead of MinGW GCC. Just copy your code to separate files. Then, you simply create a new project using Visual C++ as your tool-chain. Then you simple paste the files into the directory, and then run it.

    0 讨论(0)
提交回复
热议问题