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

Author Topic: SFML 2.0 in Linux  (Read 2471 times)

0 Members and 1 Guest are viewing this topic.

santiaboy

  • Full Member
  • ***
  • Posts: 118
    • View Profile
SFML 2.0 in Linux
« on: April 30, 2013, 02:00:53 am »
Hey guys, as 2.0 was released I wanted to try and code in Linux, too. I downloaded the file and then extracted it (because the sudo command brought me 1.6 :( )

However, when I try to do everything as the tutorial says, this happens:
 
||warning: libGLEW.so.1.7, needed by /home/santi/SFML-2.0/lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)|
/home/santi/SFML-2.0/lib/libsfml-graphics.so||undefined reference to `__glewUniform1fARB'|
//and 38 more errors

It happens when I try to compile via code::blocks, and via console, too! (It compiles, but the linker fails)

Aparently, I have a newer libGLEW, and that's why the error happens...so, any way to fix it? :p

EDIT: I don't know if it changes something, but I am using ubuntu 12.10
« Last Edit: April 30, 2013, 02:08:07 am by santiaboy »

fstream

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: SFML 2.0 in Linux
« Reply #1 on: April 30, 2013, 02:14:48 am »
You could symlink your libGLEW.so to libGLEW.so.1.7 - it should probably work properly.

Better yet you can compile it yourself to make it link to the libraries you already have :)
http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php

santiaboy

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: SFML 2.0 in Linux
« Reply #2 on: April 30, 2013, 02:37:30 am »
Shouldn't this be included in the tutorial? I mean, I followed it exactly as it said in the tutorial, and still couldn't get the program running...

Also, I could do that? Is there any other option? An easier one perhaps? :P

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10784
    • View Profile
    • development blog
    • Email
Re: SFML 2.0 in Linux
« Reply #3 on: April 30, 2013, 02:46:03 am »
It kinda depends, personally I feel like this is essentially an issue on the lack of knowledge on how Linux works and the error message is also quite verbose, so even if the Linux dev knowledge is missing, it should be fairly simple to google and figure it out.

The problem is, that SFML's Linux binary are linked against a specific version of GLEW (1.7) and if the linker can't find that specific version, it will complain. symlinking the libGLEW.so can trick the linker into thinking that it has the correct version, but it might not work correctly.
That whole problem should go away though, as soon as the official package managers will pickup SFML 2.0 as their new version, unfortunately this might take quite some time, depending on the Linux distribution.

And again as stated by fstream, the best way to go about any library, that isn't in the official packet manager, is to compile it from source. That's just kind how Linux is intended to be used. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

santiaboy

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: SFML 2.0 in Linux
« Reply #4 on: April 30, 2013, 03:02:49 am »
...an issue on the lack of knowledge on how Linux works...

That might explain it, as I have little to none Linux knowledge. I guess I'll wait for the official packages, as I fear I will make a mess otherwise.

Thanks though!

 

anything