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

Author Topic: SOLVED cannot fin -lsfml-graphics  (Read 2726 times)

0 Members and 1 Guest are viewing this topic.

KungWilliam

  • Newbie
  • *
  • Posts: 2
    • View Profile
SOLVED cannot fin -lsfml-graphics
« on: June 13, 2017, 03:53:06 pm »
Hi!
When I compile with the line: g++ Game.o player_class.o platform.o game_class.o health_class.o weapons.o projectile.o Menu.o -o sfml-app -lsfml-graphics -lsfml-window -lsfml-audio -lsfml-network -lsfml-system

I get the message:
/usr/bin/ld: cannot find -lsfml-graphics
/usr/bin/ld: cannot find -lsfml-window
/usr/bin/ld: cannot find -lsfml-audio
/usr/bin/ld: cannot find -lsfml-network
/usr/bin/ld: cannot find -lsfml-system
collect2: error: ld returned 1 exit status

I use Ubuntu 16.04

I had problems updating to SFML 2.4.2 (did it with cmake, the real problem was linking the libraries afterwards), but I then removed SFML (this is where I believe the problem occured, since i could'nt use sudo make uninstall i manally deleted the files from /usr/include, lib and share)  I then reinstalled SFML 2.3.2 with the command:

sudo apt-get install libsfml-dev

now when I try to compile i get the message posted above.

I'd appreciate any suggestions.
« Last Edit: June 13, 2017, 04:13:13 pm by KungWilliam »

KungWilliam

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SOLVED cannot fin -lsfml-graphics
« Reply #1 on: June 13, 2017, 04:14:18 pm »
hehehe

fixed it myself.

removed SFML 2.3.2 then sudo aptg-get autoremove and installed it again..

Turbine

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: SOLVED cannot fin -lsfml-graphics
« Reply #2 on: June 14, 2017, 09:36:20 am »
When you've got some time, I'd build SFML from source. It's quite easy to do. ;)

In my build system I automatically download SFML and have it automatically build for Windows/Linux/Android and all of the architectures supported - On my Linux box. (Cmake cli)

 

anything