Accessing extern variable in Ruby DLL

Jordan Miner TheUndaunted at NOSPAM.gmail.com
Sat Jan 17 17:12:13 PST 2009


torhu Wrote:

> On 17.01.2009 04:30, Jordan Miner wrote:
> > extern unsigned long rb_cObject;
> >
> > so in my binding I have
> >
> > extern uint rb_cObject;
> 
> For accessing variables in a DLL, you need to do it like this:
> 
> export extern (C) extern uint rb_cObject;
> 

That worked, thank you! I already had extern(C): at the top of the file, but I hadn't thought of adding export.




More information about the Digitalmars-d mailing list