Sign in to follow this  

FLTK on win32

This topic is 2334 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using FLTK to create a window (for my renderer) in my current project, but as I understand it will always create a console window in win32 for some reason, which is fine in my debug build. I read that FLTK has a WinMain function that can be overridden, but how? I tried but I've gotten errors so I left it alone and forgot about it, which leads to my second question. Sometimes I forget that I have to close the window that I created to close the app and NOT close the console window, because the game terminates right then and doesn't clean up (DirectX, FMOD, etc.) and causes memory leaks. With that being said, how do I check if the console window was closed or if the application is about to be terminated?

Share this post


Link to post
Share on other sites
If you are using main(), you are linking a command line application that wants a command prompt window.
You can tell Visual C++ that you want to link a Windows application (using WinMain(), which you must provide) instead; I don't know where the option is located, maybe the entry point is chosen according to which function is present..

Share this post


Link to post
Share on other sites
Thanks a lot! now it doesn't show a console in my release build. Now the only thing is that in debug build when I close the console window, it doesn't break the game loop like it should. Is there any way to check if the console window was closed?

Share this post


Link to post
Share on other sites

This topic is 2334 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this