Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 8 of 8

Thread: Glut doesnt work and its pissin me off

  1. #1
    Guest

    Glut doesnt work and its pissin me off

    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

  2. #2
    Intern Contributor
    Join Date
    Mar 2000
    Location
    PA, USA
    Posts
    74

    Re: Glut doesnt work and its pissin me off

    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?

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2001
    Location
    Canada
    Posts
    25

    Re: Glut doesnt work and its pissin me off

    follow these steps, they will fix your problems unless your program is wrong.
    http://www.cs.unc.edu/~mcneill/comp2...ing_up_gl.html

  4. #4

    Re: Glut doesnt work and its pissin me off

    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.

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: Glut doesnt work and its pissin me off

    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.

  6. #6
    Junior Member Newbie
    Join Date
    Feb 2001
    Posts
    2

    Re: Glut doesnt work and its pissin me off

    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.

  7. #7
    Junior Member Newbie
    Join Date
    Feb 2001
    Location
    Canada
    Posts
    25

    Re: Glut doesnt work and its pissin me off

    Element,

    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.

    Rizo

  8. #8
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,797

    Re: Glut doesnt work and its pissin me off

    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.
    Deiussum
    Software Engineer and OpenGL enthusiast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •