SDL* and GL bindings

Bruno Medeiros brunodomedeirosATgmail at SPAM.com
Mon May 22 10:41:41 PDT 2006


Anders F Björklund wrote:
> 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
> 

I was thinking gdmd was this (an old D compiler):
http://www.digitalmars.com/d/archives/D/gnu/462.html
Only now have I realized that this was GDC's previous name, right?


>> 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)
> 

It is the same, with "sdl/*.d" it will still not compile due to module 
conflicts.

> 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. :-)
> 

Ok. ;)

>>> 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 ?
> 

Yes, they use different "lib" formats, and to link successfully you have 
to rebuild the .lib with DMC from the sources, or, more easily, you now 
have the "coffimplib" tool that does that work:
http://www.digitalmars.com/d/archives/c++/announce/864.html

But what has this to do with the compatibility of the D bindings 
themselves? Seems to me it doesn't affect it at all.

> 
> 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

I think Build is easier in *any* platform.
Also, I use Windows, but I have MSYS installed and use it often. In 
fact, in the semester that I had some C++ projects, I used mingw's GCC 
(plus Eclipse CDT) more often than MS VC++.
In any case this is all besides the point.

-- 
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list