Before You Build

Make sure you have installed the Platform SDK and had follow all the instructions to enable compiling Win32 API programs from here:

DirectX is optional but should probably be installed the same way you installed the Platfrom SDK. That is followed Step 3 and Step 4 on the usingpsdk page except with substituting the DirectX directories.

How to build SDL with Visual C++ 2005 Express Edition

1. Download and unpack the latest CVS snapshot or stable release.

2. Unpack into the current folder. If you accidentally

3. Open the SDL solution in the VisualC directory.

4. Allow Visual C++ to convert the project to the latest version.

5. Remove the Version.rc resource from the project.

6. Build!

Creating a Project with SDL

1. Create a project as a Win32 Application.

2. Create a C++ file for your project.

3. Set the C runtime to Multi-threaded DLL(/MDd) in the menu: Project|Properties|C/C++ tab|Code Generation|Runtime Library.

4. Add the SDL include directory to your list of includes in the menu: Project|Properties|C/C++ tab|General|Additional include directories .

5. The "include directory" I am referring to is the include folder within the main SDL directory, eg C:\SDL\include

6. Copy the following files into your Project directory:

7. Copy the following files into your Project directory, and add them to your Project as well:

Distributing/deploying your exe

In most cases you need add DLLs of Visual Studio to your distribution. Check out this forum thread for more details. Alternatively, you go with the offical installer from Microsoft.

Please note that executables from the new Visual Studio won't run on Windows 98 anymore. See separate FAQ question in this regards.

FAQ_Compiling_on_Microsoft_Visual_C++_2005_Express (last edited 2008-06-04 13:32:05 by uli.s)