SFML community forums

Help => General => Topic started by: MyOwnBitch on August 09, 2012, 11:56:43 am

Title: libGLEW and libsfml-graphics.so
Post by: MyOwnBitch on August 09, 2012, 11:56:43 am
Hi!

My first post so I just want to start with saying I'm a huge fan of SFML, wonderful job.

However, I have a problem with latest sfml fetched with git. I'm using cmake to generate build-files.

When I compile my own project (using on cmake as well), which using SFML, I get this:
/bin/ld: warning: libGLEW.so.1.5, needed by /usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../lib64/libsfml-graphics.so, not found (try using -rpath or -rpath-link)

Any ideas?

Thanks,
Fredrik
Title: Re: libGLEW and libsfml-graphics.so
Post by: Laurent on August 09, 2012, 12:18:26 pm
Is libGLEW.so.1.5 in a path which is known by the library loader?
Title: Re: libGLEW and libsfml-graphics.so
Post by: MyOwnBitch on August 09, 2012, 12:35:17 pm
Yes, its in /usr/lib64/ which also is the path for sfml libs and the linker has no problem finding them...

The reason its not finding 1.5 is that I have the 1.6 version of glew. But I compiled sfml with 1.6 so I thought it would be possible to compile my own program with 1.6 as well?

What am I missing? =)
Title: Re: libGLEW and libsfml-graphics.so
Post by: Laurent on August 09, 2012, 01:01:46 pm
Why is it looking for 1.5 if you compiled it with 1.6? Are you sure that you're not using an old precompiled version or SFML?
Title: Re: libGLEW and libsfml-graphics.so
Post by: MyOwnBitch on August 09, 2012, 01:25:03 pm
I'm really confused about this as well.

I fetched a fresh copy of sfml with git and compiled it. In my system I have sfml-libs in two paths /usr/lib and /usr/lib64/.

The SFML-libs are structured like this in both paths libsfml-audio.so -> libsfml-audio.so.2 -> libsfml-audio.so.2.0

When I execute "sudo yum info libGLEW / GLEW / GLEW-devel", all of them is 1.6.

So yes... I'm sure I'm not using old sfml-libs :)


Title: Re: libGLEW and libsfml-graphics.so
Post by: Laurent on August 09, 2012, 01:27:23 pm
Quote
In my system I have sfml-libs in two paths /usr/lib and /usr/lib64/.
Why two, if you only have one version of SFML?
Title: Re: libGLEW and libsfml-graphics.so
Post by: MyOwnBitch on August 09, 2012, 01:42:15 pm
Ok, cool. That was the problem. Before I compiled myself I used the precompiled version that was installed under /usr/lib64. However, when I compiled it myself it only installed itself under /usr/lib.

A copy from /usr/lib to /usr/lib64 made the trick :)

Thanks for the help.
Title: Re: libGLEW and libsfml-graphics.so
Post by: Laurent on August 09, 2012, 01:45:02 pm
You can set the install path (i.e. change it from /usr/lib to /usr/lib64) directly into CMake with the CMAKE_INSTALL_PREFIX variable, as explained in the tutorial.