# Setting up SDL, etc. in Windows

**URL:** <https://discourse.libsdl.org/t/setting-up-sdl-etc-in-windows/16052>\
**Category:** SDL Development\
**Created:** [February 23, 2009, 4:06am UTC](https://discourse.libsdl.org/t/setting-up-sdl-etc-in-windows/16052 "2009-02-23T04:06:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam2](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/adam2/32/805_2.png) [@Adam2](https://discourse.libsdl.org/u/Adam2)\
**Post date:** [February 23, 2009, 4:06am UTC](https://discourse.libsdl.org/t/setting-up-sdl-etc-in-windows/16052/1 "2009-02-23T04:06:22Z")

</div>

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](http://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

---

<div class="post-metadata">

**Author:** ![Ken\_Rogoway](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/k/a5b964/32.png) [@Ken\_Rogoway](https://discourse.libsdl.org/u/Ken_Rogoway)\
**Post date:** [February 23, 2009, 4:23am UTC](https://discourse.libsdl.org/t/setting-up-sdl-etc-in-windows/16052/2 "2009-02-23T04:23:30Z")

</div>

> 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](http://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

---

<div class="post-metadata">

**Author:** ![Patryk\_Bratkowski](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@Patryk\_Bratkowski](https://discourse.libsdl.org/u/Patryk_Bratkowski)\
**Post date:** [February 23, 2009, 6:15pm UTC](https://discourse.libsdl.org/t/setting-up-sdl-etc-in-windows/16052/3 "2009-02-23T18:15:19Z")

</div>

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.

> **[Code::Blocks](https://www.codeblocks.org/)**
>
> The IDE with all the features you need, having a consistent look, feel and operation across platforms.

As for the question of setting everything up, let me point you to another website:  
[http://lazyfoo.net/SDL\_tutorials/index.php](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 🙂  
Pat\> ----- Original Message -----

> From: [ken@homebrewsoftware.com](mailto: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](http://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)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
