Can't get rid of console window with Visual Studio 2013

Hi folks, this is driving me nuts, I hope someone can help.

Building with SDL2 and Visual Studio Express 2013 and when I run my prog, I get a console window as well as the SDL graphics window. I don’t want this!

I’ve tried building as a console app, a windows app, and every other combination I can think of.

Changing the SUBSYSTEM:CONSOLE to SUBSYSTEM:WINDOWS gives me a link error:
Unresolved external symbol _WinMain MSVCRT.lib(crtexew.obj)

Anyone? Not got much hair left now to pull out :frowning:

You’ll want to use the Windows subsystem to avoid having a console window open up. I think you just need to link with SDL2main.lib to get SDL2 to provide you with a WinMain, see:

1 Like

Huge thanks, I haven’t tried this.


Thanks again, Eric. Problem was that I had started with a console project rather than an empty c++ project - which made all the difference.

Thanks again.

1 Like