Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: cant compile opengl tutorial  (Read 3123 times)

0 Members and 1 Guest are viewing this topic.

ravenheart

  • Full Member
  • ***
  • Posts: 148
    • View Profile
cant compile opengl tutorial
« on: December 19, 2008, 10:32:12 am »
i tried to compile the opengl tutorial using code::blocks but i alway get errors:


Quote

obj\Debug\main.o||In function `main':|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|31|undefined reference to `_glClearDepth@8'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|32|undefined reference to `_glClearColor@16'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|35|undefined reference to `_glEnable@4'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|36|undefined reference to `_glDepthMask@4'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|39|undefined reference to `_glMatrixMode@4'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|40|undefined reference to `_glLoadIdentity@0'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|41|undefined reference to `_gluPerspective@32'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|60|undefined reference to `_glViewport@16'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|69|undefined reference to `_glClear@4'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|72|undefined reference to `_glMatrixMode@4'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|73|undefined reference to `_glLoadIdentity@0'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|74|undefined reference to `_glTranslatef@12'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|75|undefined reference to `_glRotatef@16'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|76|undefined reference to `_glRotatef@16'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|77|undefined reference to `_glRotatef@16'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|80|undefined reference to `_glBegin@4'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|82|undefined reference to `_glVertex3f@12'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|83|undefined reference to `_glVertex3f@12'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|84|undefined reference to `_glVertex3f@12'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|85|undefined reference to `_glVertex3f@12'|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|87|undefined reference to `_glVertex3f@12'|
obj\Debug\main.o:C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|88|more undefined references to `_glVertex3f@12' follow|
obj\Debug\main.o||In function `main':|
C:\Users\Osiris\Documents\MEINS\OPENGL_1\main.cpp|112|undefined reference to `_glEnd@0'|
||=== Build finished: 23 errors, 0 warnings ===|



what am i doing wrong is there any file missin on my system?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
cant compile opengl tutorial
« Reply #1 on: December 19, 2008, 10:48:41 am »
You must link to the OpenGL library (-lopengl32 in linker options).
Laurent Gomila - SFML developer

ravenheart

  • Full Member
  • ***
  • Posts: 148
    • View Profile
cant compile opengl tutorial
« Reply #2 on: December 19, 2008, 11:01:48 am »
o yes forgot opengl and glu^^

 

anything