SFML community forums
Help => General => Topic started by: Anthony11 on June 27, 2015, 01:13:48 am
-
when i incorporate static SFML in Visual C++ 2010 (express edition), i was trying to make a release version without the console, so i set the system to WINDOWS (also tried NATIVE), and i switched the entry point to "main". the compile is successful but an unhandled error message shows... so is there any fix for this, or an alternative to make a consoleless build which works?
-
To remove the console, you simply set the subsystem to window and link against sfml-main all while using the main() function as entry point.
If you get an error you probably have another issue and without the actual error provided (nor debugged) we can't say what's it about. ;)
-
i only recently noticed the "main" lib, so thanks, i'll try that
-
You can use too:
FreeConsole()
https://msdn.microsoft.com/en-us/library/windows/desktop/ms683150(v=vs.85).aspx
(https://msdn.microsoft.com/en-us/library/windows/desktop/ms683150(v=vs.85).aspx)
-
You can use too:
FreeConsole()
https://msdn.microsoft.com/en-us/library/windows/desktop/ms683150(v=vs.85).aspx
(https://msdn.microsoft.com/en-us/library/windows/desktop/ms683150(v=vs.85).aspx)
Not really a good solution since that is Windows specific.
Just use main() and link sfml-main as already said.