#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    55
    Rep Power
    11

    undefined troubles


    I typed in the beginning few lines of a tut:

    #include <stdio.h>
    #include <windows.h>
    #include <gl\glut.h>
    #include <stdlib.h>

    int main(int argc,char** argv)
    {
    glutInit (&argc, argv);
    }

    got these errors:

    [Linker error] undefined reference to `glutInit@8'
    C:\Program Files\c++\Dev-Cpp\ben-prog\Makefile.win
    [Build Error] [Project1.exe] Error 1

    I've put glu32,opengl32,user32,gdi32,glaux,advapi32 in the parameters box. Why do I keep getting the linker error?
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    Do you have opengl on your machine?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    55
    Rep Power
    11
    How do you mean? If I've got the gl header files and libs then isn't that enough?
  6. #4
  7. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    What I mean is: are you sure that you have the actual libraries and specific header files that you need?
    If you didn't actually install the opengl libraries they you may not have the required files that you need. i.e. with MVSC++ 6 only has three header files in the GL include directory. GL.H, GLAUX.H, and GLU.H
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    55
    Rep Power
    11
    I guess that's my problem - I don't know which header/lib the GlutInit needs. Anybody know how you find out?

IMN logo majestic logo threadwatch logo seochat tools logo