SFML community forums
Help => General => Topic started by: rltm on January 26, 2010, 09:35:02 pm
-
So I am trying SFML out, and the first thing I noticed was that there is a console window running in the background. So I tried to set the subsystem to Windows. When I try to run it again the following error appears :
Error 1 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup MSVCRTD.lib
I have linked against sfml-system-s-d.lib, sfml-window-s-d.lib and sfml-graphics-s-d.lib (in DEBUG mode of course).
Any suggestions how to make this work?
-
Link to sfml-main.
-
That worked. Thanks. Now I want to know how I should be able to figure that out myself. Trial-and-error? Google-is-your-friend? The tutorials don't mention anything about it. Or do I fail to search carefully?
-
Of course you failed ;)
In the first tutorial about windowing, "Opening a window":
Under Windows operating systems, you may have created a "Windows Application" project, especially if don't want the console to show up. In such case, to avoid replacing main by WinMain, you can link with SFML_Main static library and keep a standard and portable main entry point.
-
That worked. Thanks. Now I want to know how I should be able to figure that out myself. Trial-and-error? Google-is-your-friend? The tutorials don't mention anything about it. Or do I fail to search carefully?
That's not SFML problem related at all :-P
-
Man I feel so stupid now XD