User forums > Using Code::Blocks

Beginner trying to make an empty dummy .exe

(1/1)

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

--- Code: ---void main() {
  ;
}
--- End code ---

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.

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.

Navigation

[0] Message Index

Go to full version