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

Author Topic: [SFML 2.0] Error Linking  (Read 3831 times)

0 Members and 2 Guests are viewing this topic.

rush905

  • Newbie
  • *
  • Posts: 36
    • View Profile
[SFML 2.0] Error Linking
« on: February 11, 2013, 07:40:31 pm »
I'm currently running GNU/Linux Mint and trying to get SFML 2.0 running. I went into the tutorial for Linux for SFML 2.0 and used the sample code. I downloaded and placed the include/SFML into /usr/include. And I also placed SFML/lib into /usr/lib.

I was then able to compile the source from the tutorial successfully with "g++ -c main.cpp"
But when I tried to link it with "g++ main.o -o sfml-app -lsfml-graphics -lsfml-window -lsfml-system"

I got these errors. Any ideas?:

/usr/bin/ld: warning: libGLEW.so.1.5, needed by /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniform1fARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_shader_objects'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGetObjectParameterivARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_vertex_shader'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewFramebufferTexture2DEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniformMatrix4fvARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGenFramebuffersEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniform3fARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewRenderbufferStorageEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_fragment_shader'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewActiveTextureARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewShaderSourceARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `glewInit'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewBindFramebufferEXT'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewFramebufferRenderbufferEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewLinkProgramARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUseProgramObjectARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewBlendFuncSeparateEXT'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGenRenderbuffersEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniform2fARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniform4fARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewCreateProgramObjectARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `glewGetErrorString'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewCompileShaderARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewDeleteObjectARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGetUniformLocationARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGetInfoLogARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_EXT_blend_func_separate'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewDeleteFramebuffersEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewCheckFramebufferStatusEXT'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniform1iARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_texture_non_power_of_two'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_shading_language_100'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewCreateShaderObjectARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewBindRenderbufferEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_EXT_framebuffer_object'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewAttachObjectARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGetHandleARB'

collect2: error: ld returned 1 exit status

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [SFML 2.0] Error Linking
« Reply #1 on: February 11, 2013, 08:10:28 pm »
Well, just read the message:

Quote
libGLEW.so.1.5, needed by libsfml-graphics.so, not found
Laurent Gomila - SFML developer

rush905

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: [SFML 2.0] Error Linking
« Reply #2 on: February 11, 2013, 08:34:23 pm »
Well, just read the message:

Quote
libGLEW.so.1.5, needed by libsfml-graphics.so, not found

How do I get libGLEW.so.1.5

EDIT: I ran "sudo apt-get install libglew1.5 libjpeg62" and I still get the same errors.
« Last Edit: February 11, 2013, 08:37:03 pm by rush905 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [SFML 2.0] Error Linking
« Reply #3 on: February 11, 2013, 08:37:10 pm »
You should rather recompile SFML, so that it links to your installed version of GLEW.
Laurent Gomila - SFML developer

Manawasp

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: [SFML 2.0] Error Linking
« Reply #4 on: October 28, 2013, 11:20:12 am »
Sorry for up this old topic,

but i have the same error and i resolved it :
if you don't want recompil SFML-2.1, SFML-2.1 use libGLEW.so.1.5 :

- go to http://glew.sourceforge.net/
- take glew1.5 source code(i taked 1.5.0)
- decompress it, compil, and now copy glew dir in your project.
- Inside the Makefile add the lib-path (example for me "LIB= ./glew/lib/libGLEW.so.1.5")
and include-path (ex: "LDFLAGS= -Iglew/include")
(or "-Ilib/glew/include -Llib/glew/lib -lGLEW")

try again :)
« Last Edit: October 28, 2013, 04:42:28 pm by Manawasp »