2 Random Questions

Hello,

I have a question that’s been bugging me for quite some time now, it might be a
stupid question, but how come SDL can have only 1 (I’m talking about the VC
build here) .dll/.lib file which works with Debug AND Release builds? Whenever
I create a library, I have to ship a debug version and a release version with
my binaries, since if a release built application would link against the debug
built library or the other way around, it generates linker errors or other
strange warnings.

My second question is isn’t really related to SDL, but related to VC++. Suppose
I’m writing a game with Visual C++ 2008, I know I have to ship the Visual C++
2008 Redistributable with it or tell the client that he or she has to have it
installed. Is it true that if I change ‘Multi-threaded (Debug) DLL’ into ‘Multi-
threaded (Debug)’ this will no longer be required?

Thanks for your time,
Creature

I have a question that’s been bugging me for quite some time now, it might
be a
stupid question, but how come SDL can have only 1 (I’m talking about the
VC
build here) .dll/.lib file which works with Debug AND Release builds?
Whenever
I create a library, I have to ship a debug version and a release version
with
my binaries, since if a release built application would link against the
debug
built library or the other way around, it generates linker errors or other
strange warnings.

There’s an option I believe, to ignore certain libraries. When building a
release you
would want to ignore the debug ones (if i recall correctly, those are the
ones ending
with a “d”, like msvcrtd.lib). There was a webpage that described it alot
better than
I can, but I don’t remember the address. Maybe someone else does?

My second question is isn’t really related to SDL, but related to VC++.
Suppose
I’m writing a game with Visual C++ 2008, I know I have to ship the Visual
C++
2008 Redistributable with it or tell the client that he or she has to have
it
installed. Is it true that if I change ‘Multi-threaded (Debug) DLL’ into
’Multi-
threaded (Debug)’ this will no longer be required?

I don’t know about that one either. To tell you the truth I got so
frustrated with the
while Microsoft dependency thing, that I switched to compiling the release
using
MingW32 with Code::blocks. I had found an installer that installed both, and
after
setting up a few paths I ended up with tiny executables and no headaches.

I still write and debug in VC++ however, it’s a great IDE and an excellent
debugger.

Cheers,
Peter

Yes, you’ll need to include C/C++ standard library in some way, but I
think you can create a “private assembly” (an assembly where all
required assemblies are located in the same directory as the
executable AFAIK, try to look this up in MSDN).

As for the static version, it won’t require the redistributable but
you’ll have to ensure that no other DLL loaded by your application
tries to interact with your app using the C/C++ mechanisms (e.g.
atexit()) because it just won’t work. I don’t remember if SDL uses the
C standard library, but if it does, you’ll need to rebuild SDL with
MSVC++ 2008 and use the DLL version of the standard library.

IMHO you should use GCC under MinGW or Cygwin (if you use SDL you want
to be cross-platform, don’t you?). Eclipse C/C++ Development Tooling
has improved greatly in the Ganymede release and is fully compatible
with MinGW (but you’ll have to install MinGW by hand). Code::Blocks
and Dev-C++ are here, too.

If you want to use Microsoft compilers, try to find the MSVC++ 2003
Toolkit (distributed gratis) - it’s not on the Microsoft site now but
it is available on the Net (search for VCToolkitSetup.exe or
VCToolkitSetup.zip). MS folks say it’s obsolete, but the advantage is
that MSVC 7.1 standard libraries are common nowadays and also that you
can simply drop the DLLs into you program folder and be happy with
that. The Toolkit doesn’t have an IDE, so you’ll have to use
Code::Blocks or write Makefile.nmake by hand.