Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: help, programming with opengl

  1. #1
    Newbie Newbie
    Join Date
    Jul 2014

    help, programming with opengl

    Hi, I started to programming en CodeBlocks with C, using OpenGL, I used the functions gluInit, gluInitWindowSize, etc, I created a triangle, but when I want to change the perspective with gluLookAt, appears a message "undefined reference to 'gluLookAt' "

    I think need a header

    In compiler settings, I added "-I/usr/include"
    In linker setting, I added "-L/usr/lib -lGL -lGLEW -lglut"
    I have installed freeglut (-devel), mesa-libGL (-devel), mesa-libGLU (-devel), mesa-libGLw (-devel)

  2. #2
    Member Regular Contributor Agent D's Avatar
    Join Date
    Sep 2011
    Innsbruck, Austria
    The functions are called glutInit and glutInitWindowSize because they are parts of GLUT, the GL Utillity Toolkit.
    They are linked propperly, because you link with "-lglut".

    gluLookAt doesn't have a glut, but a glu prefix. It is part of GLU, the GL Utility library. You need to link againgst GLU,
    i.e. you are missing "-lGLU" in your linker settings.

Posting Permissions

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