Register
raylib»Forums»Raylib and WinMain
3 posts
Raylib and WinMain
1 month ago Edited by Tjom2000 on April 23, 2020, 1:57 p.m. Reason: Initial post
Hello,

In order to prevent the console opening alongside my programs, I figured changing the entry point would do the trick. It does work ultimately, but I still have a few questions about this.

Including windows.h causes some conflicts so I went in and manually fixed those, a bit tedious to do but i'm down with that! I'm wondering however if there's maybe another way to handle this kind of thing.

Also, is there maybe some other way to hide the console?

Thanks!
Ray
61 posts / 1 project

I love videogames development.

Raylib and WinMain
1 month ago
Actually hidding the console could be done just with a compilation parameter, in case of GCC it is: -mwindows
3 posts
Raylib and WinMain
1 month ago
Muchas gracias!

You've sent me in the right direction. Msvc requires the following linker flags:
1
/linker /subsystem:windows /entry:mainCRTStartup

Using WinMain does this automatically.

Cheers!