Well, just messing with it myself, the solution seems to be to make a .a library, link with /lib/libc.a since unlike .o, .a breaks shared linkage, and then refer to it in libs as "$PACKAGE_DIR/libmywrapper.a"

...
        "preBuildCommands": ["make -C $PACKAGE_DIR"],       
"libs": ["$PACKAGE_DIR/libmymagick.a","ImageMagick","/lib/libc.a"]
...

basically.

Then it doesn't work, because when ImageMagick calls dlopen, dmd somehow switches the string "RegisterGIFImage" with "gif_LTX_RegisterGIFImage" in the resulting executable.

But the wrapper works fine at least.

Reply via email to