[SDL] Developing a standalone EXE in VC++ with SDL - possible?

David Olsen jolynsbass at gmail.com
Mon Jan 28 18:00:38 PST 2008


So, this is not considered static linking of SDL? Hallelujah! You sir, are a 
champion!!!! I've got to try this out on my project now!
-Dave

----- Original Message ----- 
From: "Peter Mackay" <mackay.pete+sdl at gmail.com>
To: "A list for developers using the SDL library. (includes SDL-announce)" 
<sdl at lists.libsdl.org>
Sent: Monday, January 28, 2008 4:06 PM
Subject: Re: [SDL] Developing a standalone EXE in VC++ with SDL - possible?


>I don't have a howto link, but here's a rough guide:
>
> 1. Create a new Win32 project
> 2. Fish SDL_win32_main.c out of the SDL source code and add it to your 
> project.
> 3. Set the "Character Set" option to "Use Multi-Byte Character Set"
> (needed for SDL_win32_main.c - possibly a bug?).
> 4. Add "SDL.lib" to your list of dependencies.
> 5. Add a main() method as per usual.
>
> At this point you should have a functional SDL app. Now to get rid of
> the unwanted dependencies:
>
> 6. Go into the project properties, C/C++ subtree, Code Generation
> pane, then change "Runtime Library" from "Multi-threaded Debug DLL"
> and "Multi-threaded DLL" (for Debug and Release configurations
> respectively) to "Multi-threaded Debug" and "Multi-threaded".
>
> That should do it. I verified it just now, and the only dependencies
> of my app are "SDL.DLL" and "KERNEL32.DLL", as desired.
>
> Hope this helps!
>
> Peter
>
> On 28/01/2008, Stephen Anthony <sa666666 at gmail.com> wrote:
>> On Monday 28 January 2008 18:09, Peter Mackay wrote:
>> > It's quite possible to build an exe which behaves in this way using
>> > VC++ 2005 Express (I've not updated to 2008 yet) by using the non-DLL
>> > (static) runtime libraries and including SDL_win32_main.c in your
>> > project instead of SDLmain.lib.
>>
>> Please point me to a howto on this if you can.  Since Mingw isn't
>> supported that well in Vista32, and not at all in Vista64, it would be
>> nice to duplicate this functionality using Visual Studio.
>>
>> Steve
>> _______________________________________________
>> SDL mailing list
>> SDL at lists.libsdl.org
>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org 



More information about the SDL mailing list