SFML community forums

Help => General => Topic started by: Euphemios on March 17, 2013, 03:56:15 pm

Title: Run program outside of Code::Blocks
Post by: Euphemios on March 17, 2013, 03:56:15 pm
Hello!
I'm really new to SFML and Debian. If I run and compile my project in Code::Blocks, everything works fine.. But if I want to run it with the terminal, I get this error message:

root@XX-debian:/home/XX/Documents/C++/sfml_02/bin/Debug# ./sfml_02
./sfml_02: error while loading shared libraries: libsfml-graphics.so.2: cannot open shared object file: No such file or directory

I also put the sfml libs in the Debug folder to test it.. Still not working. I am pretty sure that it is not that hard to do that.

OS: Debian squeeze
SFML version: 2.0
Title: Re: Run program outside of Code::Blocks
Post by: JoshuaBehrens on March 17, 2013, 04:22:18 pm
Did you have any lib-search-paths/-directories added in Codeblocks? They might have to be added to the environment you execute it. But if you installed sfml right it should be found automagically.
Title: Re: Run program outside of Code::Blocks
Post by: Euphemios on March 17, 2013, 04:47:13 pm
Do you mean in the build options?

Search directories:
Compiler:
../../../SFML/SFML2/include
Linker:
../../../SFML/SFML2/lib

And in Linker settings:
sfml-graphics
sfml-window
sfml-system
Title: Re: Run program outside of Code::Blocks
Post by: Euphemios on March 19, 2013, 01:25:02 pm
bump.. anyone know how to do that?
Title: Re: Run program outside of Code::Blocks
Post by: AlexAUT on March 19, 2013, 01:29:04 pm
Maybe the tutorial for SFML2 under linux will help you http://www.sfml-dev.org/tutorials/2.0/start-linux.php

Especially this :
Quote
If SFML is not installed in a standard path, you need to tell the library loader where to find the SFML libraries first:

export LD_LIBRARY_PATH=<sfml-install-path>/lib && ./sfml-app
Title: Re: Run program outside of Code::Blocks
Post by: Euphemios on March 19, 2013, 04:17:11 pm
thank you!