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

Author Topic: Shared Libraries problem  (Read 5723 times)

0 Members and 2 Guests are viewing this topic.

DuCT

  • Newbie
  • *
  • Posts: 7
    • View Profile
Shared Libraries problem
« on: October 15, 2011, 04:04:31 am »
Okay, so I did a fresh install of Xubuntu 11.10, and when I try to run a run a simple program I get this error.


./a.out: error while loading shared libraries: libsfml-graphics.so.2: cannot open shared object file: No such file or directory

Everything compiles fine, so uh. Whats going on?

Oh, here's the code if it helps
Code: [Select]

#include <SFML/Graphics.hpp>

int main()
{
sf::RenderWindow window(sf::VideoMode(854, 480), "cos(x), the next Nullular Grapher!");

int x = 0;
int y = 0;

sf::Shape rect = sf::Shape::Rectangle(1, 1, 1, 1, sf::Color::Red);

while (window.IsOpened())
{
sf::Event event;
while (window.PollEvent(event))
{
if (event.Type == sf::Event::Closed)
{
window.Close();
}
}

window.Clear();

rect.SetPosition(1, 1);

window.Draw(rect);

window.Display();
}

return EXIT_SUCCESS;
}
[/code]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Shared Libraries problem
« Reply #1 on: October 15, 2011, 10:46:02 am »
Where is the shared library located? Make sure that it is known by the library loader (ld).
Laurent Gomila - SFML developer

DuCT

  • Newbie
  • *
  • Posts: 7
    • View Profile
Shared Libraries problem
« Reply #2 on: October 15, 2011, 03:56:30 pm »
Apparently, the lib files weren't installed to /usr/lib, but to /usr/local/lib. Just did a simple copy paste as root and ran ldconfig -v as root. That seems to have fixed the problem.

 

anything