Instantiate C struct on heap

TencoDK via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Aug 4 14:02:59 PDT 2016


Hey,

I'm using DerelictSFML2 + CSFML, I have stuck on instantiating 
window.

derelict/window.d (binding from C):
struct sfWindow;

my_file.d:
sfWindow* sfmlWindow = null;
sfmlWindow = new sfWindow; // ???

This code snippet gives me:
Error: struct derelict.sfml2.window.sfWindow unknown size

How must I create stuctures from C bindings?


More information about the Digitalmars-d-learn mailing list