Author Topic: Beginner trying to make an empty dummy .exe  (Read 6399 times)

jetpackgorilla

  • Guest
Beginner trying to make an empty dummy .exe
« on: September 21, 2015, 12:20:38 am »
I want to create a dummy exe program that basically does nothing at all (or the minimum possible) before exiting.

I see there are some like this like dud.exe, nop.exe, and donothing.exe, that others have created.  However they don't seem to show their source code, and I think for something this basic, I should just make my own.

However I am a total newbie, and am failing.  I installed code::blocks and also minigw.  I tried using this code
Code
void main() {
  ;
}

But I'm running into issues.  When I press "Build and Run", it gives a window that says "Process returned 1 (and some other stuff), press any key to continue.   I really don't want this though, I don't want a window to open, let alone stay open.

I searched in the /bin/debug folder for what I assume to be the compiled exe, and it doesn't even run at all, it gives me a dll error about a libgcc(some other stuff).dll file.

Can anyone help me just get this do nothing exe file to work?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Beginner trying to make an empty dummy .exe
« Reply #1 on: September 21, 2015, 12:37:26 am »
1. Open up cmd.exe
2. Run your program from cmd.exe

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Beginner trying to make an empty dummy .exe
« Reply #2 on: September 21, 2015, 12:37:46 am »
"Press any key to continue" is something that cb does for you in order to see the output of your console application.
You can disable in it in the project -> properties -> build targets.

The libgcc dependency is something related to gcc and its options.
To remove it ask in support channel for your version of the compiler.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]