iamgreaser / iceball

Open-source rewrite of the VOXLAP version of Ace of Spades.
http://iceball.build
GNU General Public License v3.0
113 stars 32 forks source link

Get rid of console on Windows #234

Open fkaa opened 8 years ago

fkaa commented 8 years ago

Currently we don't do anything to the linker flags, so we get both a console and the Iceball window when launching on windows. If we were to get rid of the console it'd be nice to have something like #130 implemented first.

To get rid of the console we must both link to SDL2main and only specify the WINDOWS module in the linker arguments like this:

set(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -mwindows")
rakiru commented 8 years ago

With these args, does it still output to the console if run from it?

fkaa commented 8 years ago

@rakiru yes, it just hides it when double click on the .exe for example. Unfortunately Visual Studio doesn't have a way to show the output, but I can probably add a option for it to use while devving.

rakiru commented 8 years ago

#ifdef _DEBUG or w/e I guess.

iamgreaser commented 8 years ago

Considering that the window disappears when any code crashes and you have to run from the commandline to see the error anyway, I'm OK with this.