interfacing C bitfield structs

Lucas Goss lgoss007 at gmail.com
Fri Mar 17 19:07:59 PST 2006


Wolfgang Draxinger wrote:
> I'm currently writing D includes for several game and graphics
> related libraries (OpenGL, OpenAL, DevIL, SDL, cairo,
> Freetype2).

Me too :)

> Now with SDL I've encountered a problem: SDL makes use of serval
> bitfields and I've no idea, how to interface them to D.
> 
> Has somebody an idea how I best interface with it elegantly?

Not sure what problem you are having.

Kyle Furlong wrote:
 > > ...You can find many of these
 > > bindings (and more) on www.dsource.org under a few projects:
 > > bindings, terra, and derelict.

 > I know, but they failed to work for me, last time I checked.

Well I know derelict works on linux. But if you don't want to take that 
approach (the dynamic loading), Anders has sdl bindings here:
http://www.algonet.se/~afb/d/

Which you can use or might help point you in the right direction.

Lucas



More information about the Digitalmars-d mailing list