Jump to content

  • Log In with Google      Sign In   
  • Create Account

Installing SDL 2.0


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Tolito   Members   -  Reputation: 256

Like
0Likes
Like

Posted 07 February 2013 - 08:00 AM

I am trying to install SDL 2.0 on Ubuntu. I have followed the directions on this page, but no SDL2 folder is created in /usr/include. In fact, it merely updates 1.2. What am I doing wrong? Here is what I have tried so far:

hg clone http://hg.libsdl.org/SDL
hg clone http://hg.libsdl.org/SDL SDL2
hg clone -u SDL-2.0 http://hg.libsdl.org/SDL SDL-2.0

 



Sponsor:

#2 ColinDuquesnoy   Members   -  Reputation: 1151

Like
1Likes
Like

Posted 07 February 2013 - 11:44 AM

Hi.

 

Could you paste the output of the following command:

 

hg clone http://hg.libsdl.org/SDL

 

 

I've just tried to clone the SDL project right now and I ended up with a SDL directory that contains sdl 2. Check out the CMakeLists.txt file in the root directory, you should find the following lines:

 

 

set(SDL_MAJOR_VERSION 2)
set(SDL_MINOR_VERSION 0)
set(SDL_MICRO_VERSION 0)

 

 


Edited by renega_666, 07 February 2013 - 11:45 AM.


#3 Tolito   Members   -  Reputation: 256

Like
0Likes
Like

Posted 07 February 2013 - 12:33 PM

The first time I ran it, it actually connected and everything. Now it just says this:

destination directory: SDL
abort: destination 'SDL' is not empty

I do not have the result from when I originally ran that, but here is the result of hg clone -u SDL-2.0 http://hg.libsdl.org/SDL SDL-2.0:

requesting all changes
adding changesets
adding manifests
adding file changes
added 6836 changesets with 29994 changes to 3457 files (+14 heads)
updating to branch default
1125 files updated, 0 files merged, 0 files removed, 0 files unresolved

I did a search of my entire File System for CMakeLists.txt. There were copies for different programs, but none in the directory for SDL 2.0 nor SDL. The ones in root folders did not contain the text, "SDL," either. This is a rather odd situation.



#4 ColinDuquesnoy   Members   -  Reputation: 1151

Like
1Likes
Like

Posted 07 February 2013 - 01:11 PM

destination directory: SDL
abort: destination 'SDL' is not empty

 

That means you've already cloned the SDL project. You should have a SDL folder in your home directory (assuming you actually ran the command from your home). Can you paste the output of this command:

 


grep SDL_MAJOR_VERSION SDL/CMakeLists.txt

 

You should get this output:

 

set(SDL_MAJOR_VERSION 2)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")

 

 



#5 Sik_the_hedgehog   Crossbones+   -  Reputation: 1833

Like
1Likes
Like

Posted 07 February 2013 - 01:23 PM

Never used the repository directly, I stuck to the snapshots since those are easier to build. In those cases I can get away with this (once extracted, make sure to go to the relevant directory):





./configure
make
sudo make install
sudo ldconfig

(that last one is so you can start using the library right away instead of waiting for the operating system to update the cache, otherwise it'll be ready to use when you reboot anyway)

 

With Hg the problem is that it expects the build directory to be separate or it'll complain at you. This topic appeared a bit ago in the SDL mailing list, the following two suggestions may help you with this one:

Make a directory (anywhere) and cd into it. Then run your <SDL2 dir>/configure from there.

Make a copy of SDL in a separate directory and remove the .hg folder from it, that should do the trick. It's not exactly out of source building, but it's easier to just get it working.

After that you should be able to build SDL as I mentioned before.

 

Also CMake support still is unreliable as far as I know. If you just want to get SDL working I'd suggest to avoid it in the meanwhile.


Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

#6 Tolito   Members   -  Reputation: 256

Like
0Likes
Like

Posted 07 February 2013 - 02:36 PM

Thank you both! SDL 2.0 is now up and running!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS