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

Author Topic: SFML and CMake with Ubuntu  (Read 4394 times)

0 Members and 1 Guest are viewing this topic.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6259
  • Thor Developer
    • View Profile
    • Bromeon
SFML and CMake with Ubuntu
« on: December 24, 2010, 12:36:20 am »
Hi, I've just set up Ubuntu 10.04 and I'm now trying to install SFML. I downloaded it via subversion, I also installed CMake (and its GUI version).

When I try to configure SFML, I get the following errors:
Code: [Select]
CMake Error at /usr/share/cmake-2.8/Modules/FindX11.cmake:372 (MESSAGE):
  Could not find X11
Call Stack (most recent call first):
  src/SFML/Window/CMakeLists.txt:77 (find_package)

A lot of entries contain a "NOTFOUND". How can I find out the correct paths to X11? Shouldn't they be recognized automatically?

When I try to install the X11 package ("sudo apt-get install x11-common"), I'm told my version is up-to-date. Sorry for this beginner question, but I'm not too familiar with Ubuntu.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: first SFML book

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
SFML and CMake with Ubuntu
« Reply #1 on: December 24, 2010, 02:33:11 am »
You need the "-dev" version of X11 (and also of other libraries). So in this case you need libX11-dev.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6259
  • Thor Developer
    • View Profile
    • Bromeon
SFML and CMake with Ubuntu
« Reply #2 on: December 24, 2010, 04:26:41 pm »
Thanks. Now I've managed to build SFML and run the examples.

The next step is to compile my own projects on Linux... ;)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: first SFML book

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
SFML and CMake with Ubuntu
« Reply #3 on: December 24, 2010, 04:37:26 pm »
Much less help available for those, but good luck :D

CleverBoy

  • Newbie
  • *
  • Posts: 25
  • Game on!!
    • View Profile
    • Email
Re: SFML and CMake with Ubuntu
« Reply #4 on: August 22, 2016, 04:19:27 pm »
I am getting the same error..

However there is not libX11-dev

 Unable to locate package libX11-dev

man'O'war

  • Newbie
  • *
  • Posts: 46
  • What needs to be done is done by those capable.
    • View Profile
Re: SFML and CMake with Ubuntu
« Reply #5 on: August 22, 2016, 04:30:10 pm »
Hi,

Same issue here:
Have a look https://forum.ubuntu-fr.org/viewtopic.php?id=362676

Quote
sudo apt-get install libx11-dev
If it does not work. Do an update then try.
cd /tmp/
wget -c http://fr.archive.ubuntu.com/ubuntu/pool/main/libx/libx11/libx11-dev_1.2.2-1ubuntu1_i386.deb
sudo dpkg -i ./libx11-dev_1.2.2-1ubuntu1_i386.deb


CleverBoy

  • Newbie
  • *
  • Posts: 25
  • Game on!!
    • View Profile
    • Email
Re: SFML and CMake with Ubuntu
« Reply #6 on: August 22, 2016, 04:33:33 pm »
It errored out..

wget -c http://fr.archive.ubuntu.com/ubuntu/pool/main/libx/libx11/libx11-dev_1.2.2-1ubuntu1_i386.deb
--2016-08-20 00:37:10--  http://fr.archive.ubuntu.com/ubuntu/pool/main/libx/libx11/libx11-dev_1.2.2-1ubuntu1_i386.deb
Resolving fr.archive.ubuntu.com (fr.archive.ubuntu.com)... 194.158.119.190, 2001:860:f70a:100::2
Connecting to fr.archive.ubuntu.com (fr.archive.ubuntu.com)|194.158.119.190|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-08-20 00:37:11 ERROR 404: Not Found.


man'O'war

  • Newbie
  • *
  • Posts: 46
  • What needs to be done is done by those capable.
    • View Profile
Re: SFML and CMake with Ubuntu
« Reply #7 on: August 22, 2016, 04:35:44 pm »
Try with lowercase package name
sudo apt-get install libx11-dev

From : http://askubuntu.com/questions/131688/unable-to-locate-package-libx11-dev

Worked for me. Ubuntu 16.04

CleverBoy

  • Newbie
  • *
  • Posts: 25
  • Game on!!
    • View Profile
    • Email
Re: SFML and CMake with Ubuntu
« Reply #8 on: August 23, 2016, 07:12:40 am »
Hi,

I did that and SFML is still complaining for X11 while building a 32 bit version. Not sure if i need to make changes in cmake file to look for the right package..

Thanks.

victorlevasseur

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: SFML and CMake with Ubuntu
« Reply #9 on: August 23, 2016, 11:43:50 am »
Obviously, you need to install the 32 bits (i686) versions of the packages to build a 32 bits SFML.

 

anything