SFML community forums

Help => General => Topic started by: rltm on January 26, 2010, 09:35:02 pm

Title: Failing to make console window disappear
Post 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?
Title: Failing to make console window disappear
Post by: Laurent on January 26, 2010, 09:36:51 pm
Link to sfml-main.
Title: Failing to make console window disappear
Post by: rltm on January 26, 2010, 10:04:07 pm
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?
Title: Failing to make console window disappear
Post by: Laurent on January 26, 2010, 11:09:11 pm
Of course you failed ;)

In the first tutorial about windowing, "Opening a window":
Quote
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.
Title: Failing to make console window disappear
Post by: panithadrum on January 27, 2010, 01:07:22 am
Quote from: "rltm"
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
Title: Failing to make console window disappear
Post by: rltm on January 27, 2010, 02:37:26 pm
Man I feel so stupid now XD