View Full Version : MSVC project setup for GLUT?
12-09-2009, 04:17 AM
I've just started with MSVC++ (2008 Express), and I'm trying to run the SGI 'hello' example code from redbook/hello.c. This runs fine, except that I get two windows: the GLUT window, and the MS console window.
Any ideas on how I can set up my project so that I don't get the console window? I've tried two project templates:
1 - win32/console app
2 - general/empty project
12-09-2009, 04:46 AM
Visit http://nehe.gamedev.net and check tutorials. It is quite old stuff, but good for beginers.
12-09-2009, 05:51 AM
Thanks, but I don't think he uses GLUT - he starts with a Win32 application, so uses a Windows-specific setup. GLUT is easier and more portable, but I have to find a way to disable the redundant console...
12-09-2009, 06:06 AM
Read around "console" here, it is not the same MSVC version, but should help :
12-09-2009, 06:17 AM
Whoa! I was just about to say exactly the same thing but you beat me to it. In short, add this to your code:
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
The relevant linker options are documented at:
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.