Friday, January 28, 2005

Compiling GLUT without Console (VS .NET 2003)

Compiling GLUT without the console
Notice that when you run your GLUT OpenGL application, an obtrusive Console will appear behind it. To compile your GLUT without the Console.

Do the following (assuming you’ve created a Win32 Console Application):

(1) Click the Project Menu
(1.1) Click on the [YourProjectName] Properties ...

(2) Select Linker (on the left)
(2.1) Select System
(2.2) Under Subsystem field (on the right), choose Windows (/SUBSYSTEM:WINDOWS)

(3) Repeat the same for Active Configuration (upper left)

(4) Include <windows.h> before <glut.h&ht;
#include <windows.h>
#include <glut.h&ht;


(5) Start with WinMain() instead of main() :
WINAPI WinMain(HINSTANCE hInstance, HINSTANCE
hPrevInstance, LPSTR lpCmdLine, int nCmdShow)


0 Comments:

Post a Comment

<< Home