Calling dylib functions in Office for Mac VBA

后端 未结 2 1050
天命终不由人
天命终不由人 2021-01-25 23:54

I am attempting to call a simple function that is stored in a simple dylib file, from a simple Word for Mac macro,

I\'m creating the .dylib with Xcode5 on OS-X Mountain

相关标签:
2条回答
  • 2021-01-26 00:35

    Rather than looking up the mangled name, I suspect the easiest way is to wrap your function declarations:

    extern "C" {
    bool testFunc();
    }
    
    0 讨论(0)
  • 2021-01-26 00:55

    Success! (ugh, it was there the whole time?)

    This tutorial succinctly covers the basics of calling .dylib functions from VBA.

    Just be sure to install Xcode Command-Line Tools so that you can use the nm command to get the symbols from your library.

    0 讨论(0)
提交回复
热议问题