hiding the DOS box

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Guest

hiding the DOS box

Post by Guest »

is it possible to hide the irrlicht DOS box when running an irrlicht program?
if yes then how.
thanks
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Change from console to gui project...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

and also change:

Code: Select all

int main() 
to

Code: Select all

INT WINAPI WinMain(HINSTANCE hInst,HINSTANCE,LPSTR strCmdLine,INT) 
genesisrage
Posts: 93
Joined: Tue Feb 08, 2005 12:19 pm

Post by genesisrage »

or use just this (no need to include additional files)
just place this line at the top of the file (setting this up in build configs is what i do, so debug config shows the console, and release config doesnt)

Code: Select all

#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:main")
(there is some controversy over this method, but have not found a single problem with it, found this on MSDN. the SUBSYSTEM says its a gui, ENTRY tells it to start with main() instead of winmain)
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

whoa! genesis, that sure is an interesting tip! :wink:

just tried it out and works very nice. You say you got it from the MSDN forums?

nice tip...again
sRc
Posts: 431
Joined: Thu Jul 28, 2005 1:44 am
Location: Salt Lake City, Utah
Contact:

Post by sRc »

afecelis wrote:whoa! genesis, that sure is an interesting tip! :wink:

just tried it out and works very nice. You say you got it from the MSDN forums?

nice tip...again
i coulda sworn i seen it posted on these forums before.... >_> <_<

with source being MSDN forums then as well
The Bard sRc

Blog | Twitter
Guest

Post by Guest »

hmm tried both methods but console window still comes up.
i compiled the app with code::blocks
Guest

Post by Guest »

also i chosed Irrlicht project from code::blocks
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

hmm tried both methods but console window still comes up.
i compiled the app with code::blocks
As you 've been told already, go to Project->Properties->Targets and select "GUI application" (you must rebuild your source afterwards).
Guest

Post by Guest »

i dont think that
Acki's Irrlicht Recompiler V2.3.0 works under XP does it?
Guest

Post by Guest »

ok tried the GUI application but i keep getting this error:

.objs\main.o:main.cpp:(.text+0x2604): undefined reference to `_imp___ZN3irr14createDeviceExERKNS_27SIrrlichtCreationParametersE'

when i try to rebuild it
Guest

Post by Guest »

nevermind i figuered out the problem and it works perfectly now
thanks again guys
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Well, I'm using Code::Blocks, too !!!
It's a great IDE !!!

I only change the project type to GUI and leave the sub main as it is !!!
The pragma comments don't work with MinGW (C::B's default compiler), they are just for MSVC++...

Well, my IrrComp should work on any Windows system...
But only with DevC++ or Code::Blocks installed !!!

For example have a look at my IrrCube or IrrTris, both are compiled with C::B !!!
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
genesisrage
Posts: 93
Joined: Tue Feb 08, 2005 12:19 pm

Post by genesisrage »

@afecelis: thanks, i like using this one because K.I.S.S. (keep it simple stupid)

@guest: think you noticed this already, but when using Code::Blocks it will always show the console window when run from C::B. but when running the app directly from the whatever.exe the console window wont show up.
Post Reply