SDL* and GL bindings

Daniel Keep daniel.keep.lists at gmail.com
Mon May 22 04:38:12 PDT 2006



Anders F Björklund wrote:
> Bruno Medeiros wrote:
> [snip]
> 
> They use different "lib" formats, which I believe is one of the major
> reasons why it is so hard to link with DLLs on Windows and why Derelict
> et al were born in the first place ? On Linux and Mac OS X, I can just
> link directly with the shared libraries - no import libraries required.
> 
> My problems with DMC was when I tried to link with OpenGL and wxWidgets,
> and with the SDL libraries from the binary SDL distribution. They never
> seemed to work right out of the box, unless I rebuilt them from source.
> Thus "special", it seems that any binaries are for a) VS or b) MinGW ?
> 

The thing is that ".LIB" can mean a few things:

1. An OMF static library,
2. A COFF static library,
3. A post VC6 (I believe) COFF static library,
4. A "Whatever the hell format MS decides to use this month" static library.

The problem is that MS kept changing what format static libraries were
in.  DMD uses the original OMF format, but this is problematic since
most binary distributions of libraries are compiled for the "latest"
static library format for MSVC, which as I said is not OMF.

In that case, you've got 2 options: try to convert the import library
back to OMF (which seems to work OK most of the time), or recompile.

This is why I prefer the pure-D dynamic loading approach: the problem
simply doesn't come up :)

> 
> For me coming from Unix, it's easier to just use MSYS: configure && make
> But DMC/DMD and DM-Make/Build might be easier if you're used to Windows?

I believe you can change which compiler build uses in the configuration
files.  That said, I think the whole point of build was the remove the
need for autoconf and makefiles entirely.  I know that *I've* had my
share of pain from being forced to use the GNU toolchain under
Windows... any tool that makes that whole damn archaic mess obsolete is
gold in my book.

> 
> --anders

	-- Daniel

-- 

v1sw5+8Yhw5ln4+5pr6OFma8u6+7Lw4Tm6+7l6+7D
a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP    http://hackerkey.com/



More information about the Digitalmars-d mailing list