optlink and weak symbols

Ellery Newcomer ellery-newcomer at utulsa.edu
Tue Oct 16 22:07:43 PDT 2012


I am interfacing with some C code [python.dll], which has some structs 
declared like so:

PyTypeObject PyType_Type;

I wish to be able to link to PyType_Type like so:

extern(C) __gshared PyTypeObject PyType_Type;

in linux, I can do exactly that, but optlink is generating a new memory 
location for PyType_Type.

strings output suggests that my lib file contains the symbol PyType_Type.

Is this sort of thing supposed to work?


More information about the Digitalmars-d-learn mailing list