News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Beginner trying to make an empty dummy .exe

Started by jetpackgorilla, September 21, 2015, 12:20:38 AM

Previous topic - Next topic

jetpackgorilla

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
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?

stahta01

1. Open up cmd.exe
2. Run your program from cmd.exe

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

oBFusCATed

"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!]