SDL* and GL bindings

Anders F Björklund afb at algonet.se
Mon May 22 04:29:39 PDT 2006


Bruno Medeiros wrote:

>> Derelict is based on a different idea, namely loading function pointers?
> 
> Huh? Jamie Pelcis bindings are similar to Derelict, since they also load 
> function pointers. You said it yourself.

Oops, I must have been confused. Either way, there are two schools :-)
And I'm not really into pointers, unless they are needed (GL extensions)

> gdmd? What's that about? Isn't it an old project?

"gdmd" is a shell/script wrapper that converts the DM-style syntax into 
the GNU-style syntax as "gdc" expects. It's not another project/compiler

> In any case, you can't do "dmd *.d" on the bindings just fine (with dmd 
> at least,haven't tried with gdc), as it fails the compilation because of 
> the mismatched module names, which is what I'm trying to say.

I know, I meant to write sdl/*.d. But I will rewrite it properly...
(it's not really as confusing as I am making it sound, fortunately)

We both agree on how it should be, no use rationalizing the old hacks.
Once I have something new out, then we can start this thread over. :-)

>> In my case, I just can't ever seem to get the standard (GCC) libraries 
>> working with the special (DMC) libraries with for instance OpenGL etc. ?
>>
>> There are no real source changes, beyond that DMD uses "linux" and GDC 
>> uses "Unix" and that GDC is of an older DMD (language) specification.
> 
> I'm not understanding you here. What special DMC libraries? What's the 
> relation with OpenGL? (that phrase seems a bit misconstructed)

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 ?


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?

--anders



More information about the Digitalmars-d mailing list