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

Author Topic: Link errors on linux  (Read 4714 times)

0 Members and 1 Guest are viewing this topic.

jamba

  • Newbie
  • *
  • Posts: 7
    • View Profile
Link errors on linux
« on: April 06, 2008, 02:21:42 pm »
First of all this looks like a really great library :D and I'm glad i found out about it.

I just put the code from the render window tutorial page into a new project on codeblocks, gave it the link options
-lsfml-graphics
-lsfml-window
-lsfml-system

and hit build. And the following error happened:
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libsfml-window.so || undefined reference to `glXGetProcAddress'

Any idea how to fix this?

Edit: If i try running any of the precompiled samples the output is "symbol lookup error: /usr/lib/libsfml-window.so.1: undefined symbol: glXGetProcAddress".

jamba

  • Newbie
  • *
  • Posts: 7
    • View Profile
Link errors on linux
« Reply #1 on: April 07, 2008, 01:03:17 pm »
Ok...

Apparantly because I have nvidia drivers installed there's no such thing as glXGetProcAddress and I need to use glXGetProcAddressARB instead. A page I found on google said I need to "#define glXGetProcAddress glXGetProcAddressARB" before including <GL/glx.h>. (The page was talking about Irrlicht, not sfml, but i assume this might work anyway.)

I've added it to the file Window/Linux/WindowImplX11.hpp. Is GL/glx.h included anywhere else?

It's busy making at the moment. I'll let yous know the results.

jamba

  • Newbie
  • *
  • Posts: 7
    • View Profile
Link errors on linux
« Reply #2 on: April 07, 2008, 01:37:38 pm »
It works fine. Linux users with nVidia drivers may need to do what I did which was add "#define glXGetProcAddress glXGetProcAddressARB" to the file Window/Linux/WindowImplX11.hpp before the line "#include <GL/glx.h>"

Or maybe this fix could be added to a configure file or something?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Link errors on linux
« Reply #3 on: April 07, 2008, 02:19:46 pm »
Are you sure you have the latest drivers ? Which Linux distrib are you using ?

I have a nVidia card with Kubuntu 7.04, and don't have such problem.
Laurent Gomila - SFML developer

jamba

  • Newbie
  • *
  • Posts: 7
    • View Profile
Link errors on linux
« Reply #4 on: April 07, 2008, 04:44:50 pm »
I'm using Ubuntu 7.10 and i've got nvidia-glx-legacy drivers.

Maybe it's just the legacy drivers for rubbish graphics cards?

 

anything