SFML community forums

Help => Window => Topic started by: e_barroga on August 24, 2008, 11:04:16 pm

Title: Removing the console
Post by: e_barroga on August 24, 2008, 11:04:16 pm
After creating the Render Window, the console window still displays. How do I keep it from displaying?
Title: Re: Removing the console
Post by: quasius on August 24, 2008, 11:06:26 pm
Quote from: "e_barroga"
After creating the Render Window, the console window still displays. How do I keep it from displaying?


Either don't make a "console app" when you create your solution (make a Win32 project) or go through the project settings and change over all the settings manually.
Title: Removing the console
Post by: Beaker on August 26, 2008, 12:13:19 pm
If this is built in Visual Studio then in your project settings, go to Linker->System and set the SubSystem property to "Windows (/SUBSYSTEM:WINDOWS)". At least, that's where it is in VS2008.
Title: Removing the console
Post by: Laurent on August 26, 2008, 12:15:30 pm
And to keep main as your entry point (instead of WinMain), you must link to sfml-main.lib.
Title: Removing the console
Post by: AlZe on February 19, 2009, 03:29:33 pm
Thanks Beaker and Laurent, works fine!
Title: Removing the console
Post by: e_barroga on April 15, 2009, 08:41:15 pm
Quote from: "Laurent"
And to keep main as your entry point (instead of WinMain), you must link to sfml-main.lib.


What do you mean by "link to sfml-main.lib".

Also, what do you mean by "keep main as my entry point".
Title: Removing the console
Post by: Laurent on April 16, 2009, 01:00:06 am
Quote
What do you mean by "link to sfml-main.lib".

I mean "link to sfml-main.lib". If you really don't know what this means, then I suggest you read some basic C++ tutorial first.

Quote
Also, what do you mean by "keep main as my entry point".

I mean that your entrey point is still the portable "main" and not an OS-specific one like "WinMain".
Title: Removing the console
Post by: e_barroga on April 16, 2009, 02:42:01 am
Quote from: "Laurent"
Quote
What do you mean by "link to sfml-main.lib".

I mean "link to sfml-main.lib". If you really don't know what this means, then I suggest you read some basic C++ tutorial first.

Quote
Also, what do you mean by "keep main as my entry point".

I mean that your entrey point is still the portable "main" and not an OS-specific one like "WinMain".


Okay, I get it.... but yeah, I know how to link.
Title: Removing the console
Post by: Nexus on April 16, 2009, 12:43:08 pm
Ah, that's nice to know, I didn't expect this to be so easy. Thank you... :)
Title: Removing the console
Post by: e_barroga on April 16, 2009, 04:34:32 pm
P.S.
I wouldn't say that you would need to look in a "Basic C++ Tutorial" to learn how to link libraries.

For a beginner those tutorials are probably complex.

I learned because I needed 3 libraries to get a WinSock Network Library (39DLL) to work.
Title: Removing the console
Post by: Hiura on April 16, 2009, 05:10:55 pm
um, how would you program without basis ?
Title: Removing the console
Post by: Nexus on April 16, 2009, 08:51:33 pm
Anyway, a tutorial is not really a good way to learn C++. It's possible, but much more tedious than a good book.
Title: Removing the console
Post by: Groogy on April 18, 2009, 11:24:43 am
Quote from: "Nexus"
Anyway, a tutorial is not really a good way to learn C++. It's possible, but much more tedious than a good book.


I want to move in to a library of Programming books... *Drools*
Title: Removing the console
Post by: sebbu on July 22, 2009, 12:23:20 pm
there is no sfml-main.lib in SFML-1.5-sdk-windows-mingw.zip , only in SFML-1.5-sdk-windows-vc2008.zip ( and maybe the 2005 one )

EDIT: using -mwindows option of mingw g++, there is no more console window
Title: Removing the console
Post by: Laurent on July 22, 2009, 12:32:56 pm
That's bad :lol:

I'll fix this as soon as possible, thanks for your feedback.