SFML community forums
Help => Window => Topic started by: Rubenknex on December 06, 2010, 07:28:47 pm
-
Sorry if this is already discussed but I couldn't find it.
Every time I create a RenderWindow it also opens a CMD window. When distributing my game I don't want it to open. I'm sure there is a very simple solution for this but I have not found it yet.
-
Maybe you should create a Win32 Project not a Console Win32 Project.
-
When I set the SubSystem to SUBSYSTEM:WINDOWS instead of SUBSYSTEM:CONSOLE it gives me this error:
1>MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16
I think it means that I must change main to WinMain but I don't really know how :? .
-
From my memory it should be something like this:
int WINAPI CALLBACK WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
)
{
// do sfml stuff
return 0;
}
-
Thanks it worked! :D
-
Or you can link to sfml-main to keep main() and thus a portable code ;)