SFML community forums

Help => Graphics => Topic started by: DTSCode on August 15, 2013, 06:36:00 pm

Title: weird sfml errors
Post by: DTSCode on August 15, 2013, 06:36:00 pm
hi everyone! this is my first time on this forum, so please let me know if i inadvertantly did anything wrong, i am using sfml for the first time because sdl 2.0 doesnt have any good tutorials yet, so needless to say i have no experience. i am running ubuntu 13.04 64 bit and am compiling with g++. i downloaded the 64 bit 2.1 version and followed the tutorial to set it up on linux. i ran sudo apt-get update, but its still getting them. any help would be appreciated. thank you!

Code: [Select]
/usr/bin/ld: warning: libGLEW.so.1.5, needed by SFML-2.1/lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewUniform1fARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_shader_objects'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewGetObjectParameterivARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_vertex_shader'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewFramebufferTexture2DEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewUniformMatrix4fvARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewGenFramebuffersEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewUniform3fARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewRenderbufferStorageEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_fragment_shader'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewActiveTextureARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewShaderSourceARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `glewInit'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewBindFramebufferEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewFramebufferRenderbufferEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewLinkProgramARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewUseProgramObjectARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewBlendFuncSeparateEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewGenRenderbuffersEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewUniform2fARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewUniform4fARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewCreateProgramObjectARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `glewGetErrorString'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewCompileShaderARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewDeleteRenderbuffersEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewDeleteObjectARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewGetUniformLocationARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewGetInfoLogARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__GLEW_EXT_blend_func_separate'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewDeleteFramebuffersEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewCheckFramebufferStatusEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewUniform1iARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_texture_non_power_of_two'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_shading_language_100'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewCreateShaderObjectARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewBindRenderbufferEXT'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__GLEW_EXT_framebuffer_object'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewAttachObjectARB'
SFML-2.1/lib/libsfml-graphics.so: undefined reference to `__glewGetHandleARB'
collect2: error: ld returned 1 exit status

Title: Re: weird sfml errors
Post by: Ixrec on August 15, 2013, 07:27:08 pm
Well, like it says, it needs GLEW 1.5, so try downloading the development package for that.

Admittedly I also had trouble getting it working on Ubuntu because I had to get all the dependencies plugged into it myself.  Would be nice if SFML had an up-to-date package.  I think there's a list of the exact Ubuntu packages you need somewhere on this forum...

Edit: I think I found it. Try this:
sudo apt-get install libpthread-stubs0 libpthread-stubs0-dev libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-dev libx11-6 libx11-dev libxrandr2 libxrandr-dev libfreetype6 libfreetype6-dev libglew1.8 libglew-dev libjpeg-turbo8 libjpeg-turbo8-dev libsndfile1 libsndfile1-dev libopenal1 libopenal-dev cmake cmake-qt-gui git
Title: Re: weird sfml errors
Post by: DTSCode on August 15, 2013, 07:33:22 pm
thanks ill try it out. i had already tried sudo apt-get update and sudo apt-get install libGLEW5.1 with out any luck fyi
Title: Re: weird sfml errors
Post by: DTSCode on August 15, 2013, 07:39:02 pm
i tried it, but im still getting the same errors
Title: Re: weird sfml errors
Post by: Jebbs on August 15, 2013, 09:13:42 pm
I just looked at a few older threads, and the general consensus when encountering this issue seems to be to build SFML from source. It's actually pretty easy, and there is a very lovely tutorial here:
http://www.sfml-dev.org/tutorials/2.1/compile-with-cmake.php

Edit: I think I found it. Try this:
sudo apt-get install libpthread-stubs0 libpthread-stubs0-dev libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-dev libx11-6 libx11-dev libxrandr2 libxrandr-dev libfreetype6 libfreetype6-dev libglew1.8 libglew-dev libjpeg-turbo8 libjpeg-turbo8-dev libsndfile1 libsndfile1-dev libopenal1 libopenal-dev cmake cmake-qt-gui git

I'm not a linux user, but that looks like it just grabs the dependencies needed to build from source. It won't fix the issue since this is making sure the user has GLEW 1.8, but 1.5.
Title: Re: weird sfml errors
Post by: Ixrec on August 15, 2013, 10:23:55 pm
I thought he was trying to build it from source. Oh well.