how to export callbacks on win64?

captaindet via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Mon Oct 24 20:23:41 PDT 2016


struggling to get my code working with LDC, it works fine with 
DMD-2.071.2 (32bit optlink as well as 64bit MS link).

i want to export a callback to use with GTK / GtkD (D bindings to GTK), 
i.e. after the GTK.Builder has built my GUI, it connects signals via 
GTK.Builder.connectSignals(null) - again: this works fine with the DMD 
toolchain.

current example code for export:

extern(C) export void myCallback(GtkButton* _0){
	...
}

however, using ldc2-1.1.0-beta3-win64 w/ VS2015 i get the following GTK 
warning "Could not find signal handler 'myCallback'.  Did you compile 
with -rdynamic?"

this lead me to the following post
https://forum.dlang.org/post/n1p0j7$1j0v$1@digitalmars.com
indicating that adding "-L-rdynamic" might help in case of the GCC 
toolchain. however, MS link does not seem to have "-L-rdynamic".

so how do i make this work on windows? is there an equivalent to 
"-L-rdynamic"?

thanks
/det


More information about the digitalmars-d-ldc mailing list