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

Author Topic: Run program outside of Code::Blocks  (Read 3007 times)

0 Members and 2 Guests are viewing this topic.

Euphemios

  • Newbie
  • *
  • Posts: 10
    • View Profile
Run program outside of Code::Blocks
« 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

JoshuaBehrens

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Run program outside of Code::Blocks
« Reply #1 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.

Euphemios

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Run program outside of Code::Blocks
« Reply #2 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

Euphemios

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Run program outside of Code::Blocks
« Reply #3 on: March 19, 2013, 01:25:02 pm »
bump.. anyone know how to do that?

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Run program outside of Code::Blocks
« Reply #4 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

Euphemios

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Run program outside of Code::Blocks
« Reply #5 on: March 19, 2013, 04:17:11 pm »
thank you!

 

anything