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

Author Topic: Installing SFML with gcc (on ubuntu)  (Read 6203 times)

0 Members and 1 Guest are viewing this topic.

etse

  • Newbie
  • *
  • Posts: 3
    • View Profile
Installing SFML with gcc (on ubuntu)
« on: March 02, 2010, 10:59:52 am »
Hi.

I have for a long time been using SFML together with windows for a long time and really like this API and want to aswell use it on my laptop wich runs ubuntu. I downloaded the package with liberary and header files for linux and tried to followed the instructions on the tutorial: but when i try to install it with make i get an error:

Quote
steffen@steffen-laptop:~/Skrivebord/SFML-1.5$ sudo make install
[sudo] password for steffen:
cd: 1: can't cd to ./src/SFML
make: *** [install] Error 2


any suggestions?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Installing SFML with gcc (on ubuntu)
« Reply #1 on: March 02, 2010, 12:03:18 pm »
Hi

You should use the full SDK, the "install" target may not work with the "development files" archive. Yeah I know, I should fix it :)
Laurent Gomila - SFML developer

etse

  • Newbie
  • *
  • Posts: 3
    • View Profile
Installing SFML with gcc (on ubuntu)
« Reply #2 on: March 02, 2010, 01:21:21 pm »
Hey, and thanks for the reply. I did just download the big files, but with the unstable eduroam connection currently at my university it took a while ^^.

Anyways I tried the same with the full SDK.

I first did a normal make and got a lot of output. (Yes i ran it through sudo).
It caame up text with entereing and leaving directories (no errors) so i assume things worked.

Made a normal hello world app, also using the sf::Clock and print time. And everything linked and compiled fine and time also printed out nicely :) So everything seems to work all right now.

Thank you for your help, I will now continue exploring the world of game-programming with SFML :)

etse

  • Newbie
  • *
  • Posts: 3
    • View Profile
Installing SFML with gcc (on ubuntu)
« Reply #3 on: March 02, 2010, 01:34:13 pm »
sorry for the bump, ran into another problem. "Error: GL/gl.h : No such file or directory."

It seems like it has trouble with openGL. So for those other that might have trouble getting this to work on linux remember to download glut:

sudo apt-get install freeglut3-dev

Everything seems to work now and my game wich i made on windows runs smoothly with openGL was installed :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Installing SFML with gcc (on ubuntu)
« Reply #4 on: March 02, 2010, 02:06:52 pm »
Quote
So for those other that might have trouble getting this to work on linux remember to download glut:

sudo apt-get install freeglut3-dev

FreeGlut installs OpenGL as a dependency, but you can get OpenGL without installing FreeGlut (sorry I never remember the name of the package).
Laurent Gomila - SFML developer

RetroX

  • Newbie
  • *
  • Posts: 13
    • View Profile
Installing SFML with gcc (on ubuntu)
« Reply #5 on: March 07, 2010, 03:48:14 am »
Ubuntu already has pre-built packages for SFML.  You should just run apt-get:
Code: [Select]
apt-get install libsfml-dev libsfml-system1.5 libsfml-window1.5 libsfml-graphics1.5 libsfml-audio1.5

SlightlyConfused

  • Newbie
  • *
  • Posts: 1
    • View Profile
Installing SFML with gcc (on ubuntu)
« Reply #6 on: May 15, 2011, 05:23:48 pm »
I apologize for the necrobump, but is there any reason why the ubuntu package is version 1.5 even though the official version is 1.6?

Edit: Actually the package doesn't even include all of the necessary dependencies.

O_____O

This is very newbie-unfriendly.