Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Failing to make console window disappear  (Read 2452 times)

0 Members and 1 Guest are viewing this topic.

rltm

  • Newbie
  • *
  • Posts: 3
    • View Profile
Failing to make console window disappear
« 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Failing to make console window disappear
« Reply #1 on: January 26, 2010, 09:36:51 pm »
Link to sfml-main.
Laurent Gomila - SFML developer

rltm

  • Newbie
  • *
  • Posts: 3
    • View Profile
Failing to make console window disappear
« Reply #2 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Failing to make console window disappear
« Reply #3 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.
Laurent Gomila - SFML developer

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
Failing to make console window disappear
« Reply #4 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

rltm

  • Newbie
  • *
  • Posts: 3
    • View Profile
Failing to make console window disappear
« Reply #5 on: January 27, 2010, 02:37:26 pm »
Man I feel so stupid now XD

 

anything