• Advertisement
Sign in to follow this  

Console window missing when compiling GLUT program in Dev C++

This topic is 3035 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 compiled my project both in Visual Studio 2008 and in Dev Cpp (4.9.9.2 version) with glut according to this link http://www.astahost.com/info.php/installing-glut-dev_t14192.html. However, when I run my program in VS08 I get two windows, standard console windows and GLUT window. But when I create project in Dev (multimedia project -> GLUT)I only get GLUT window and cannot get console window. This poses as a problem since I need console window for stdio operations. How to get console window to appear in Dev?

Share this post


Link to post
Share on other sites
Advertisement
Quote:

Use the compiler switch /subsystem:console.

That's for cl.exe, the MSVC++ compiler. GCC (used by Dev-C++) will not accept that switch, as far as I know.

You shouldn't be using Dev-C++. If you need to compile on an alternative compiler to Visual Studio's, look into Code::Blocks as it is not a completely dead project.

You can force the creation of a console window using AllocConsole() and freopen(). See the MSDN reference for the Character Mode API.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement