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

Author Topic: Not Run!  (Read 5154 times)

0 Members and 1 Guest are viewing this topic.

Jawall

  • Newbie
  • *
  • Posts: 6
    • View Profile
Not Run!
« on: February 26, 2014, 09:35:47 pm »
I have installed SFML on Linux following tutorial in the site

When i compile is ok but when i try to creating the executing file from object file there are this errors:

riccardo@riccardo-MacBook:~/Documenti/SFMLwork$ g++ Main.o -o prova -L/home/riccardo/SFML-2.1/lib -lsfml-graphics -lsfml-window -lsfml-system
/usr/bin/ld: warning: libGLEW.so.1.7, needed by /home/riccardo/SFML-2.1/lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewUniform1fARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__GLEW_ARB_shader_objects"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewGetObjectParameterivARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__GLEW_ARB_vertex_shader"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewFramebufferTexture2DEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewUniformMatrix4fvARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewGenFramebuffersEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewUniform3fARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewRenderbufferStorageEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__GLEW_ARB_fragment_shader"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewActiveTextureARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewShaderSourceARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "glewInit"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewBindFramebufferEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewFramebufferRenderbufferEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewLinkProgramARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewUseProgramObjectARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewBlendFuncSeparateEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewGenRenderbuffersEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewUniform2fARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewUniform4fARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewCreateProgramObjectARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "glewGetErrorString"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewCompileShaderARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewDeleteRenderbuffersEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewDeleteObjectARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewGetUniformLocationARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewGetInfoLogARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__GLEW_EXT_blend_func_separate"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewDeleteFramebuffersEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewCheckFramebufferStatusEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewUniform1iARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__GLEW_ARB_texture_non_power_of_two"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__GLEW_ARB_shading_language_100"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewCreateShaderObjectARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewBindRenderbufferEXT"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__GLEW_EXT_framebuffer_object"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewAttachObjectARB"
/home/riccardo/SFML-2.1/lib/libsfml-graphics.so: riferimento non definito a "__glewGetHandleARB"
collect2: error: ld returned 1 exit status
 

What is it?

Jawall

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Not Run!
« Reply #1 on: February 26, 2014, 10:43:27 pm »
anybody try to help me?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Not Run!
« Reply #2 on: February 26, 2014, 10:59:43 pm »
You have just posted an hour ago, please be more patient.

These are linker errors, it looks like you have to specify GLEW in the library list.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Jawall

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Not Run!
« Reply #3 on: February 27, 2014, 12:10:46 am »
You have just posted an hour ago, please be more patient.

These are linker errors, it looks like you have to specify GLEW in the library list.

Sorry....

However, how\where do it?

Thanks!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Not Run!
« Reply #4 on: February 27, 2014, 08:54:53 am »
Add GLEW to your linker settings. If you don't know how to do that, you first might want to learn, how to use your tools. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Jawall

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Not Run!
« Reply #5 on: February 27, 2014, 09:18:53 am »
I use Code::blocks on linux and i have followed the tutorial in the site but there are no "glew" to add in linker settings...

However i have tried to add "glew" in Linker Settings of Code::blocks but nothing, not work :(

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: Not Run!
« Reply #6 on: February 27, 2014, 09:55:46 am »
If you followed the tutorial for codeblocks, referring to this picture right here:



You should do essentially the same, but add glew to the list. If that still doesn't work it means codeblocks can't find GLEW on your computer, you will either need to install it with your linux package manager or add the path to it.

The tutorial in question is the Codeblocks one for Windows but it should work almost the same. http://www.sfml-dev.org/tutorials/2.1/start-cb.php
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Jawall

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Not Run!
« Reply #7 on: February 27, 2014, 11:08:22 am »
Ok i have resolved that problem and now compile successfully, thanks for it!

But there is another problem now! When run the program this is the new error:

riccardo@riccardo-MacBook:~/Documenti/SFMLwork$ ./Main
./Main: error while loading shared libraries: libsfml-graphics.so.2: cannot open shared object file: No such file or directory

 :-\ :-\
« Last Edit: February 27, 2014, 11:10:08 am by Jawall »

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Re: Not Run!
« Reply #8 on: February 27, 2014, 11:17:14 am »
The executable can't find (at least) sfml libs.
Be sure sfml libs are in your library path.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Not Run!
« Reply #9 on: February 27, 2014, 11:29:18 am »
Run ldconfig after installing SFML.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Jawall

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Not Run!
« Reply #10 on: February 27, 2014, 11:46:17 am »
I'm sure the lib are all in the linked directory

I have already done the ldconfig comand :/

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Not Run!
« Reply #11 on: February 27, 2014, 12:14:05 pm »
-L/home/riccardo/SFML-2.1/lib
You did remember to run sudo make install right....? It installs the SFML library files to the standard location in your filesystem where ld also expects them to be. If for some reason you can't (or don't want to) install them to the standard location, you can just feed ld a temporary location in which it should additionally look for the files for the current invocation:

riccardo@riccardo-MacBook:~/Documenti/SFMLwork$ LD_LIBRARY_PATH=/home/riccardo/SFML-2.1/lib ./Main
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

 

anything