Results 1 to 2 of 2

Thread: help, programming with opengl

  1. #1
    Newbie Newbie
    Join Date
    Jul 2014
    Posts
    1

    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
    Senior Member Regular Contributor Agent D's Avatar
    Join Date
    Sep 2011
    Location
    Innsbruck, Austria
    Posts
    281
    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.

Similar Threads

  1. OpenGL programming with SLI
    By Lev Pod. in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 11-18-2009, 06:19 AM
  2. Is OpenGL Programming Same as VRML Programming
    By grungefreak1 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 09-30-2008, 03:07 PM
  3. OpenGL Programming..
    By JangoFett in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 07-21-2004, 08:43 PM
  4. New to OpenGL programming ..
    By deb_car in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-06-2002, 12:10 AM
  5. QT GUI Programming Kit, C++ and OpenGL
    By mrbokkie in forum OpenGL: Linux
    Replies: 1
    Last Post: 09-17-2001, 12:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean