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

Author Topic: (Linux 32, CodeBlocks) cannot find -lsfml-system  (Read 941 times)

0 Members and 1 Guest are viewing this topic.

Hinchy

  • Newbie
  • *
  • Posts: 6
    • View Profile
(Linux 32, CodeBlocks) cannot find -lsfml-system
« on: August 13, 2013, 06:15:31 am »
I'm at my wit's end here trying to get my project running on Linux. I used the prebuilt 32-bit Linux libraries, then when those didn't work, I compiled from source, and still nothing. The libraries definitely are in /usr/local/lib! I've searched the forums looking for any similar problems, and have tried every proposed solution, yet to no avail.

hinchy@Hinchy-PC-2013-Ubuntu:/usr/local/lib$ ls libsfml*
libsfml-audio.so      libsfml-graphics.so      libsfml-network.so      libsfml-system.so      libsfml-window.so
libsfml-audio.so.2    libsfml-graphics.so.2    libsfml-network.so.2    libsfml-system.so.2    libsfml-window.so.2
libsfml-audio.so.2.1  libsfml-graphics.so.2.1  libsfml-network.so.2.1  libsfml-system.so.2.1  libsfml-window.so.2.1
 

And yet, when I compile my game...

-------------- Clean: Release in Let Me Die (compiler: GNU GCC Compiler)---------------

Cleaned "Let Me Die - Release"

-------------- Build: Release in Let Me Die (compiler: GNU GCC Compiler)---------------

g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/entities/Actor.cpp" -o obj/Release/entities/Actor.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/entities/EntityList.cpp" -o obj/Release/entities/EntityList.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/entities/Jumpo.cpp" -o obj/Release/entities/Jumpo.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/entities/Player.cpp" -o obj/Release/entities/Player.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/entities/Solid.cpp" -o obj/Release/entities/Solid.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/AssetManager.cpp" -o obj/Release/src/AssetManager.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/DirectionUtils.cpp" -o obj/Release/src/DirectionUtils.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/Entity.cpp" -o obj/Release/src/Entity.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/EntityManager.cpp" -o obj/Release/src/EntityManager.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/Game.cpp" -o obj/Release/src/Game.o
/home/hinchy/Projects/Let Me Die/src/Game.cpp: In function ‘int Game()’:
/home/hinchy/Projects/Let Me Die/src/Game.cpp:55:20: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/hinchy/Projects/Let Me Die/src/Game.cpp:56:20: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/hinchy/Projects/Let Me Die/src/Game.cpp:57:23: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/hinchy/Projects/Let Me Die/src/Game.cpp:59:148: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/Globals.cpp" -o obj/Release/src/Globals.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/Graphic.cpp" -o obj/Release/src/Graphic.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/InputManager.cpp" -o obj/Release/src/InputManager.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/Language.cpp" -o obj/Release/src/Language.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/Level.cpp" -o obj/Release/src/Level.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/main.cpp" -o obj/Release/src/main.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/Markup.cpp" -o obj/Release/src/Markup.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/PathFinding.cpp" -o obj/Release/src/PathFinding.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/Property.cpp" -o obj/Release/src/Property.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/Sound.cpp" -o obj/Release/src/Sound.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/src/YmlConfig.cpp" -o obj/Release/src/YmlConfig.o
g++ -fexceptions -fno-unsafe-math-optimizations -L/usr/local/lib  -O2  -DSANFORDRELEASE    -I../../entities -I../../include -I/usr/local/include -I/usr/include  -c "/home/hinchy/Projects/Let Me Die/platform/lin/GetPath.cpp" -o obj/Release/platform/lin/GetPath.o
g++ -L/usr/local/lib -L/usr/lib32  -o ../../build/bin/letmedie obj/Release/entities/Actor.o obj/Release/entities/EntityList.o obj/Release/entities/Jumpo.o obj/Release/entities/Player.o obj/Release/entities/Solid.o obj/Release/src/AssetManager.o obj/Release/src/DirectionUtils.o obj/Release/src/Entity.o obj/Release/src/EntityManager.o obj/Release/src/Game.o obj/Release/src/Globals.o obj/Release/src/Graphic.o obj/Release/src/InputManager.o obj/Release/src/Language.o obj/Release/src/Level.o obj/Release/src/main.o obj/Release/src/Markup.o obj/Release/src/PathFinding.o obj/Release/src/Property.o obj/Release/src/Sound.o obj/Release/src/YmlConfig.o obj/Release/platform/lin/GetPath.o   -lportaudio -lsonicamp -lcryptopp -lz -lyaml-cpp -lboost_system -lboost_filesystem -lsfml_system -lsfml_window -lsfml_graphics -s  
/usr/bin/ld: cannot find -lsfml_system
/usr/bin/ld: cannot find -lsfml_window
/usr/bin/ld: cannot find -lsfml_graphics
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 29 seconds)
3 errors, 4 warnings (0 minutes, 29 seconds)

Please, I really need some help with this. I'd really appreciate it!

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Re: (Linux 32, CodeBlocks) cannot find -lsfml-system
« Reply #1 on: August 13, 2013, 06:51:37 am »
Your linker settings have underscores. Those should be dashes, not underscores.
I use the latest build of SFML2

Hinchy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: (Linux 32, CodeBlocks) cannot find -lsfml-system
« Reply #2 on: August 13, 2013, 08:43:12 am »
You would have thought that would have been the problem, but...  :(

EDIT: rebuilt project and it's fixed. Thanks for pointing out my derp!
« Last Edit: August 13, 2013, 08:58:47 am by Hinchy »