View Full Version : Glut doesnt work and its pissin me off

02-08-2001, 02:57 PM
i have vc++ 6.0 and could you please tell me how to get glut to work i programmed an application using glut and it gives me 22 errors about seperate function calls
i have the header and dll and all that other stuff why doesnt it work

windows really pisses me off

02-08-2001, 03:04 PM
Are you getting compiler errors, or linker errors?

If you're getting compiler errors, make sure that you have included the following files:

#include <gl.h>
#include <glu.h>
#include <glut.h>

If you're getting linker errors, make sure you put the following libraries in the input area for the linking options on your project settings:
opengl32.lib glu32.lib glut32.lib

I'm pretty sure that the glut32.lib name is correct, but I'm not sure.

Can you get any OpenGL programs to compile? Or is it just glut-based ones?

02-08-2001, 06:26 PM
follow these steps, they will fix your problems unless your program is wrong.

02-09-2001, 02:48 AM
Rizo, that site says to create a console app, and not a win32 app. That is incorrect, it should be the other way around: create a win32 app not a win32 console app. There is no email on that page so I can't contact the person who made the mistake, but maybe you can.

02-09-2001, 03:53 AM
Unless you want to tweak with compiler/linker setting, you better create a Win32 Console application. A Win32 Console application got main() as entry point, which is the same entrypoint as literally all GLUT-examples you can get uses. A Win32 application uses WinMain() as entrypoint.

02-09-2001, 06:46 AM
You can create a window-based application _and_ have main instead of WinMain. Just create a standard window-based application with VC6, go to the settings for the linker, switch through the option pages (I'm using the german Version, so i don't know the English command) and enter "mainCRTStartup" as the program entry point (case sensitive!!)

Should work fine without having a console window popping up.

02-09-2001, 06:58 AM

I know that it is possible to create either a console app or just a normal win32. However, to keeps things simple (less programming for newbies) it is better to start with a console app. The only nag would be the console window popping up, which you can easily disable in compile options.

I set up my environment just exactly as the page says and I haven't had any problems.


02-09-2001, 08:24 AM
They should almost create a separate forum called "Newbies who can't get their OpenGL apps to compile." Then someone could just periodically post a new thread saying "Put the libraries in your project!", "#include <windows.h> before <gl.h>!", "Download the glut headers and libraries to use glut!"

It seems there is always a number of threads from people who don't understand linking/compiling issues and don't bother to check to see if someone else has already posted a similar question. I'm guessing these questions are probably in the FAQ too, but who really expects newbies to check a FAQ?

I don't mean to be mean or anything, but these problems really stem from a lack of C/C++ knowledge rather than a real OpenGL problem.