Sign in to follow this  

I don't want a console window!!!

This topic is 4830 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

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

This topic is 4830 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this