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

Martin mwoody at uymail.com
Sat Jan 26 19:06:20 PST 2008


I've recently begun development of a small game written in C++ using SDL. 
Overall, I've been very pleased with the library, but I've run into trouble when
it comes to porting the finished product to other machines for testing.  It runs
fine on the development machine, but errors out in a multitude of ways when
executed anywhere else.  Some research reveals that the problem lies in linking
to external runtime libraries.

I'm using Visual Studio 2008 on a Windows XP machine.  Per the SDL installation
instructions, I set my compiler to generate code as a "multi-threaded DLL." 
However, it turns out this means VC++ won't compile the EXE as a standalone
(well, standalone as in the EXE and SDL.dll) but instead wants to install its
own DLLS on the target machine.  I consider this option unacceptable, as I don't
want to require an installer for such a simple program.  Including the
msvcr90.dll files with the program, per Microsoft's instruction, isn't proving a
viable solution (it crashes as well).

In short, my question is: is there a way to use SDL without requiring that my
program be compiled as a multi-threaded DLL?  Why is it that other compilers
seem to produce an end-product (a simple executable) that Microsofts' solution
cannot?

Thank you in advance for any assistance you can provide.



More information about the SDL mailing list