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

Author Topic: Can't install on Linux  (Read 2370 times)

0 Members and 1 Guest are viewing this topic.

Namal

  • Newbie
  • *
  • Posts: 6
    • View Profile
Can't install on Linux
« on: June 22, 2012, 02:54:50 pm »
Hello,

 I tried to install the library on two different destributions (ubuntu and Xbuntu) but it doesn't work. Since I don't know witch version I need (32 or 64) I tried them both. For 34 I get an error

Quote
make: *** No rule to make target `install'.  Stop.

For 64 I get

Quote
make[1]: Entering directory `/home/namal/Downloads/SFML-1.6/src/SFML'
make[2]: Entering directory `/home/namal/Downloads/SFML-1.6/src/SFML/System'
make[2]: Leaving directory `/home/namal/Downloads/SFML-1.6/src/SFML/System'
make[2]: Entering directory `/home/namal/Downloads/SFML-1.6/src/SFML/Window'
make[2]: Leaving directory `/home/namal/Downloads/SFML-1.6/src/SFML/Window'
make[2]: Entering directory `/home/namal/Downloads/SFML-1.6/src/SFML/Network'
make[2]: Leaving directory `/home/namal/Downloads/SFML-1.6/src/SFML/Network'
make[2]: Entering directory `/home/namal/Downloads/SFML-1.6/src/SFML/Graphics'
make[2]: Leaving directory `/home/namal/Downloads/SFML-1.6/src/SFML/Graphics'
make[2]: Entering directory `/home/namal/Downloads/SFML-1.6/src/SFML/Audio'
make[2]: Leaving directory `/home/namal/Downloads/SFML-1.6/src/SFML/Audio'
make[1]: Leaving directory `/home/namal/Downloads/SFML-1.6/src/SFML'

But when I try the clock example in the tutorial I get another error for g++ -o clock clock.o -lsfml-system :

g++: error: unrecognized option ‘-system’

I have no idea what I am doing wrong. Also: I am new to linux. Pls help me.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Can't install on Linux
« Reply #1 on: June 22, 2012, 03:05:09 pm »
If you start, you should use SFML 2.0. There's a precompiled RC on the website.

Quote
unrecognized option ‘-system’
Did you write "-lsfml -system" or "-lsfml-system"? The first one is wrong.
Laurent Gomila - SFML developer

Namal

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Can't install on Linux
« Reply #2 on: June 22, 2012, 03:17:13 pm »
Yes,  that was the error. Now I have no compilition errors. But I get this error when I try to run the programm:

Quote
/clock: error while loading shared libraries: libsfml-system.so.1.6: cannot open shared object file: No such file or directory

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Can't install on Linux
« Reply #3 on: June 22, 2012, 03:22:44 pm »
The installation path of SFML must be known by the library loader. I don't know how to register new library paths on Linux so you'll have to find this information by yourself. Or wait for someone else to answer.
Laurent Gomila - SFML developer

CrazyBillyO

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Can't install on Linux
« Reply #4 on: June 22, 2012, 08:45:32 pm »
Yes,  that was the error. Now I have no compilition errors. But I get this error when I try to run the programm:

Quote
/clock: error while loading shared libraries: libsfml-system.so.1.6: cannot open shared object file: No such file or directory

A simple way to add libraries to your library path is to set the LD_LIBRARY_PATH environment variable to contain the directories of the libraries needed right before executing the program.  I have my IDE (Eclipse CDT) set LD_LIBRARY_PATH to the location of the SFML libraries right before it executes my program so that it knows where to find them when it runs.  Another alternative is to put the libraries in a directory on the library path, but I'm personally avoiding doing that due to 2.0 still being in RC status.  The setting of LD_LIBRARY_PATH can be put into a script of some sort so that it doesn't manually be set each time if you prefer.  I'd avoid globally setting LD_LIBRARY_PATH, as that may cause some confusion when applications search for libraries.

Namal

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Can't install on Linux
« Reply #5 on: June 22, 2012, 11:58:26 pm »
I got it done by installing through the software manager