So I've managed to crash calls to my external library a few times and have read conversations about similar issues with declare but can't make this work. I have created a very simple C library on MacOS, the library call is:
The Xojo side is reading a file into a MemoryBlock and then calling the library and passing the MemoryBlock as a Ptr, unfortunately the library call crashes. The library is only a test lib so it's not actually doing anything just returning an int of 0.
The Xojo call I'm making is:
declare Function testMethod lib <libName> ( ByRef file as Ptr ) as Integer
How does one declare and pass a pointer to a file/memory blob to an external library from Xojo?
There is always the possibility that the test library I created is wonky, I did create a 2nd test library, one that has Double as both arg and return which takes the square root of the number passed and that works from Xojo w/o issue.