• Advertisement
Sign in to follow this  

I don't want a console window!!!

This topic is 4903 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do I make it so my SDL applications don't use the console window when working with Dev-C++ 5. I tried the "DO not create console window" thing but it's still there.

Share this post


Link to post
Share on other sites
Advertisement
adding -lmingw32 -mwindows to the linking options, you should always create a win32 project, not a win32 console project.

Share this post


Link to post
Share on other sites
BTW there's a "SDL on Dev C" page, you should look at it, it's fairly simple.

http://docs.deninet.com/sdl_on_dev_c.htm

Share this post


Link to post
Share on other sites
But wouldn't making it a windows application in Dev-C++ make so it only works with windows??? I used that one and there's not a console window but I'm not sure it'll work with other OS's. I'm fine with it being Windows only though.

Share this post


Link to post
Share on other sites
Worst-case scenario, do a conditional compile to switch between WinMain for Windows targets and main for others. Writing portable code is a bitch; very often it actually requires writing separate code for various platforms and including a mechanism for automatic selection.

Look on the bright side. It used to be that you had to write different code for different compilers to maximize performance - on the same platform!

Share this post


Link to post
Share on other sites
you don't need to change Winmain or main, SDL do that for you, if you use SDL, you don't need to change a bit of code(well you'll have to tweak a few things) only the way you compile it on each target platform, i.e. linker and compiler options.

Share this post


Link to post
Share on other sites
Okay, well I compiled this in Dev_C++ as a windows application so there would be no console window. If you have a Mac or Linux, test it please. http://home.comcast.net/~joobot/sdlcrossplatformtest.zip

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you have to compile the code in each target platform, cross platform in SDL doesn't work as in java (compile once, run everywhere) rather you have the same code for different target platform, i.e. you make a different executable file for each platform.

Share this post


Link to post
Share on other sites
Oh okay. But would I need those platforms to do so or can I get some windows software that allows me to compile for Linux or Mac

Share this post


Link to post
Share on other sites
im not sure, but google for "cross compiler".I know mingw produce windows executable on linux(i tested it and it's pretty neat) don't know of a compiler for windows that produce linux code(cygwin maybe,im just guessing). Anyway i prefer installing linux on a small partition, so you can code and test with linux. I don't know how you would be dealing with mac :P

Share this post


Link to post
Share on other sites
Quote:
Original post by YamianI tried the "DO not create console window" thing but it's still there.


If this is Yes then it should not create the console window. Are you sure it is set to Yes?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement