Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to compile the first sample program that comes with sfml on Fedora. First it told me that I needed to link all of the libraries properly but then I got it all configured and now I'm stuck on this error:

[jdorsey@fedora-josh sfml_test]$ g++ test.o -o test-app -lsfml-graphics -lsfml-window -lsfml-system
/usr/bin/ld: warning: libGLEW.so.1.5, needed by /usr/local/lib/libsfmlgraphics.so, not found (try using -rpath or -rpath-link)
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewUniform1fARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_shader_objects'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewGetObjectParameterivARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_vertex_shader'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewFramebufferTexture2DEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewUniformMatrix4fvARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewGenFramebuffersEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewUniform3fARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewRenderbufferStorageEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_fragment_shader'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewActiveTextureARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewShaderSourceARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `glewInit'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewBindFramebufferEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewFramebufferRenderbufferEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewLinkProgramARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewUseProgramObjectARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewBlendFuncSeparateEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewGenRenderbuffersEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewUniform2fARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewUniform4fARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewCreateProgramObjectARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `glewGetErrorString'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewCompileShaderARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewDeleteRenderbuffersEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewDeleteObjectARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewGetUniformLocationARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewGetInfoLogARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__GLEW_EXT_blend_func_separate'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewDeleteFramebuffersEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewCheckFramebufferStatusEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewUniform1iARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_texture_non_power_of_two'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_shading_language_100'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewCreateShaderObjectARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewBindRenderbufferEXT'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__GLEW_EXT_framebuffer_object'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewAttachObjectARB'
/usr/local/lib/libsfml-graphics.so: undefined reference to `__glewGetHandleARB'
collect2: error: ld returned 1 exit status

I've got all of the glew libraries and include files in the include and lib folders in /usr/local, and I made sure to grab version 1.5, but it just isn't working. I tried adding a config file in ld.so.conf.d but I'm not sure if I'm doing everything right.

The main pieces of information that I need are:

Am I doing something wrong? Will adding a conf file and doing ldconfig help? How can I fix this?

I ran into another question about this but none of the fixes there worked for mine.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.