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

Author Topic: Can't link with sfml-window and sfml-graphics  (Read 1724 times)

0 Members and 1 Guest are viewing this topic.

Overv

  • Newbie
  • *
  • Posts: 9
    • View Profile
Can't link with sfml-window and sfml-graphics
« on: May 30, 2010, 06:59:41 pm »
When I try to compile the sample which demonstrates sleep and only requires sfml-system, it works fine:

Code: [Select]
overv@overv-desktop:~/Development/SFMLTest$ g++ -c main.cpp
overv@overv-desktop:~/Development/SFMLTest$ g++ -o main main.o -lsfml-system
overv@overv-desktop:~/Development/SFMLTest$ ./main
1.96032e-06
0.500192
1.00028
1.50035
2.00042
2.5005
3.00058
3.50065
4.00073
4.50081


However, as soon as I start linking with sfml-window, I'm getting a segfault:

Code: [Select]
overv@overv-desktop:~/Development/SFMLTest$ g++ -o main main.o -lsfml-window -lsfml-system
overv@overv-desktop:~/Development/SFMLTest$ ./main
Segmentation fault


Are my libraries broken or have I forgotten something? This is on Ubuntu 10.04 x64.

Overv

  • Newbie
  • *
  • Posts: 9
    • View Profile
Can't link with sfml-window and sfml-graphics
« Reply #1 on: June 02, 2010, 08:15:10 pm »
It turned out my graphics drivers were the issue. Sorry guys.