Setting up SDL, etc. in Windows

Hello all,

This is my first post to the list so I apologize if this is an
inappropriate question… I just need a little help setting my
application up. I’m a Mac user, and my project uses SDL, SDL_mixer,
SDL_ttf, and SDL_image, but I’m currently attempting to port the
project to Windows. I’m new at developing for Windows, so I don’t know
how to set things up for it. Apple uses .frameworks, and I need a PC
equivalent.

I was directed to download the .dll and .lib files from libsdl.org,
which I did, but it still doesn’t work. I’m getting integer divide by
zero errors, apparently in SDL_mixer.dll. I’m using VC++ 9, and I
noticed that the download page says that SDL_image has a .dll for VC 9

  • all the others are for VC 8.

So here are my questions:

  1. Is this the correct approach (using .dll files)? If not, what is?
  2. If it is the correct approach, is there a way to update the .dlls,
    or do I need to make them myself for VC 9?

All help is appreciated, and thanks in advance!

Adam

This is my first post to the list so I apologize if this is an
inappropriate question… I just need a little help setting my
application up. I’m a Mac user, and my project uses SDL, SDL_mixer,
SDL_ttf, and SDL_image, but I’m currently attempting to port the
project to Windows. I’m new at developing for Windows, so I don’t know
how to set things up for it. Apple uses .frameworks, and I need a PC
equivalent.

I was directed to download the .dll and .lib files from libsdl.org,
which I did, but it still doesn’t work. I’m getting integer divide by
zero errors, apparently in SDL_mixer.dll. I’m using VC++ 9, and I
noticed that the download page says that SDL_image has a .dll for VC 9

  • all the others are for VC 8.

So here are my questions:

  1. Is this the correct approach (using .dll files)? If not, what is?
  2. If it is the correct approach, is there a way to update the .dlls,
    or do I need to make them myself for VC 9?

Adam,

Yes #1 is the correct approach. If you read the license agreement it
explains the requirements for distributing apps that use SDL.

The best way to make sure you have everything installed properly is to build
the DLL’s yourself and then test out the sample apps that come with SDL in
the test folder.

Are you using the new (and changing) SDL 1.3 or the stable SDL 1.2.13? I
can help you with issues regarding SDL 1.2.13, but I haven’t installed SDL
1.3 yet since it is still a work in progress.

  • Ken Rogoway

Hello,

I personally use and love Code::Blocks IDE. It’s cross-platform, and it makes it easier for me to port my code from Linux to Windows; just have to make a build target with different libraries and I can use the same project file to compile it.

I don’t own a Mac, so I never tried the Mac version, but I know there is one available.

Maybe you can take a look at that and see if it suits your needs. It’s Open Source and free.
http://www.codeblocks.org/

As for the question of setting everything up, let me point you to another website:
http://lazyfoo.net/SDL_tutorials/index.php

Articles 1 and 3 give the instructions for setting up SDL and extra libraries (SDL_mixer, etc.)

The instructions for Visual Studio .NET 2008 Express should be what you’re looking for, or there are also instructions for other environments.

Good luck :slight_smile:
Pat> ----- Original Message -----

From: ken@homebrewsoftware.com (Ken Rogoway)
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Sunday, February 22, 2009 10:23:30 PM
Subject: Re: [SDL] Setting up SDL, etc. in Windows

This is my first post to the list so I apologize if this is an
inappropriate question… I just need a little help setting my
application up. I’m a Mac user, and my project uses SDL, SDL_mixer,
SDL_ttf, and SDL_image, but I’m currently attempting to port the
project to Windows. I’m new at developing for Windows, so I don’t know
how to set things up for it. Apple uses .frameworks, and I need a PC
equivalent.

I was directed to download the .dll and .lib files from libsdl.org,
which I did, but it still doesn’t work. I’m getting integer divide by
zero errors, apparently in SDL_mixer.dll. I’m using VC++ 9, and I
noticed that the download page says that SDL_image has a .dll for VC 9

  • all the others are for VC 8.

So here are my questions:

  1. Is this the correct approach (using .dll files)? If not, what is?
  2. If it is the correct approach, is there a way to update the .dlls,
    or do I need to make them myself for VC 9?

Adam,

Yes #1 is the correct approach. If you read the license agreement it
explains the requirements for distributing apps that use SDL.

The best way to make sure you have everything installed properly is to build
the DLL’s yourself and then test out the sample apps that come with SDL in
the test folder.

Are you using the new (and changing) SDL 1.3 or the stable SDL 1.2.13? I
can help you with issues regarding SDL 1.2.13, but I haven’t installed SDL
1.3 yet since it is still a work in progress.

  • Ken Rogoway

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org