Infamy
01-19-2005, 06:44 AM
Hello everyone,
I am attempting to compile my first OpenGL program, but I run into the following errors:
$ gcc hellok.c
hellok.c:49:2: warning: no newline at end of file
/tmp/ccQrLcMW.o(.text+0xe): In function `display':
: undefined reference to `glClear'
/tmp/ccQrLcMW.o(.text+0x2d): In function `display':
: undefined reference to `glColor3f'
/tmp/ccQrLcMW.o(.text+0x39): In function `display':
: undefined reference to `glBegin'
/tmp/ccQrLcMW.o(.text+0x58): In function `display':
: undefined reference to `glVertex3f'
/tmp/ccQrLcMW.o(.text+0x77): In function `display':
: undefined reference to `glVertex3f'
/tmp/ccQrLcMW.o(.text+0x96): In function `display':
: undefined reference to `glVertex3f'
/tmp/ccQrLcMW.o(.text+0xb5): In function `display':
: undefined reference to `glVertex3f'
/tmp/ccQrLcMW.o(.text+0xba): In function `display':
: undefined reference to `glEND'
/tmp/ccQrLcMW.o(.text+0xbf): In function `display':
: undefined reference to `glFlush'
/tmp/ccQrLcMW.o(.text+0xef): In function `init':
: undefined reference to `glClearColor'
/tmp/ccQrLcMW.o(.text+0xfb): In function `init':
: undefined reference to `glMatrixMode'
/tmp/ccQrLcMW.o(.text+0x100): In function `init':
: undefined reference to `glLoadIdentity'
/tmp/ccQrLcMW.o(.text+0x12c): In function `init':
: undefined reference to `glOrtho'
/tmp/ccQrLcMW.o(.text+0x150): In function `main':
: undefined reference to `glutInit'
/tmp/ccQrLcMW.o(.text+0x15c): In function `main':
: undefined reference to `glutInitDisplayMode'
/tmp/ccQrLcMW.o(.text+0x170): In function `main':
: undefined reference to `glutInitWindowSize'
/tmp/ccQrLcMW.o(.text+0x184): In function `main':
: undefined reference to `glutInitWindowPosition'
/tmp/ccQrLcMW.o(.text+0x190): In function `main':
: undefined reference to `glutCreateWindow'
/tmp/ccQrLcMW.o(.text+0x1a1): In function `main':
: undefined reference to `glutDisplayFunc'
/tmp/ccQrLcMW.o(.text+0x1a6): In function `main':
: undefined reference to `glutMainLoop'
collect2: ld returned 1 exit statusI get the impression that I have not included certain libraries, but I am not sure really what I am missing. Here is what I have included:
#include <GL/glut.h> // Header File For The GLUT Library
#include </usr/lib/opengl/ati/include/gl.h> // Header File For The OpenGL32 Library
#include <GL/glu.h> // Header File For The GLu32 Library
#include </usr/lib/opengl/ati/include/glx.h>
#include<stdio.h>
#include<math.h>
#include<stdlib.h>Thanks a lot for the help,
Infamy
I am attempting to compile my first OpenGL program, but I run into the following errors:
$ gcc hellok.c
hellok.c:49:2: warning: no newline at end of file
/tmp/ccQrLcMW.o(.text+0xe): In function `display':
: undefined reference to `glClear'
/tmp/ccQrLcMW.o(.text+0x2d): In function `display':
: undefined reference to `glColor3f'
/tmp/ccQrLcMW.o(.text+0x39): In function `display':
: undefined reference to `glBegin'
/tmp/ccQrLcMW.o(.text+0x58): In function `display':
: undefined reference to `glVertex3f'
/tmp/ccQrLcMW.o(.text+0x77): In function `display':
: undefined reference to `glVertex3f'
/tmp/ccQrLcMW.o(.text+0x96): In function `display':
: undefined reference to `glVertex3f'
/tmp/ccQrLcMW.o(.text+0xb5): In function `display':
: undefined reference to `glVertex3f'
/tmp/ccQrLcMW.o(.text+0xba): In function `display':
: undefined reference to `glEND'
/tmp/ccQrLcMW.o(.text+0xbf): In function `display':
: undefined reference to `glFlush'
/tmp/ccQrLcMW.o(.text+0xef): In function `init':
: undefined reference to `glClearColor'
/tmp/ccQrLcMW.o(.text+0xfb): In function `init':
: undefined reference to `glMatrixMode'
/tmp/ccQrLcMW.o(.text+0x100): In function `init':
: undefined reference to `glLoadIdentity'
/tmp/ccQrLcMW.o(.text+0x12c): In function `init':
: undefined reference to `glOrtho'
/tmp/ccQrLcMW.o(.text+0x150): In function `main':
: undefined reference to `glutInit'
/tmp/ccQrLcMW.o(.text+0x15c): In function `main':
: undefined reference to `glutInitDisplayMode'
/tmp/ccQrLcMW.o(.text+0x170): In function `main':
: undefined reference to `glutInitWindowSize'
/tmp/ccQrLcMW.o(.text+0x184): In function `main':
: undefined reference to `glutInitWindowPosition'
/tmp/ccQrLcMW.o(.text+0x190): In function `main':
: undefined reference to `glutCreateWindow'
/tmp/ccQrLcMW.o(.text+0x1a1): In function `main':
: undefined reference to `glutDisplayFunc'
/tmp/ccQrLcMW.o(.text+0x1a6): In function `main':
: undefined reference to `glutMainLoop'
collect2: ld returned 1 exit statusI get the impression that I have not included certain libraries, but I am not sure really what I am missing. Here is what I have included:
#include <GL/glut.h> // Header File For The GLUT Library
#include </usr/lib/opengl/ati/include/gl.h> // Header File For The OpenGL32 Library
#include <GL/glu.h> // Header File For The GLu32 Library
#include </usr/lib/opengl/ati/include/glx.h>
#include<stdio.h>
#include<math.h>
#include<stdlib.h>Thanks a lot for the help,
Infamy