64 bit OpenCV

A while ago, there was a posting on an OpenCV port to Xojo.
I tried it and it was great, but it seems it was also 32 bit.
I may be wrong but my App was made in 32 bit mode…

I went to see if there was a 64 bit implementation for OpenCV I believe indeed there is.

OpenCV2-framework-for-mac

What I’m tying to figure out is what I need to declare in Xojo so that I can use the new library.
It would seem to me that this has to be a matter of declaring each and every public method, constant, data type and structure of the library and all their return types and parameters …

Declare Sub cvConvertImage Lib world (src As Ptr, dst As Ptr, flags As integer)

I found this in the framework header files imgcodecs_c.h

CVAPI(void) cvConvertImage( const CvArr* src, CvArr* dst, int flags CV_DEFAULT(0));

Hmm… So it would seem to me that if I parse all the .h files for these public methods maybe I can build a script to write the declarations for me?

I may be wrong but I bet there is a lot that stays the same between the 64 and 32 bit declaration, but there must be some obvious candidates for modification.
lets say for example only that in C it’s an int and that was an Int32 in Xojo and now has to be an Int64… Maybe it’s easier to take the existing declaration in Xojo and adjust them…

If I’m not mistaken, Xojo’s Integer type will be Int32 for 32-bit compiles and Int64 for 64-bit compiles… Some C functions might require Int32 regardless of 32/64-bit, so just keep an eye out for that…

I think there was a Xojo project that would do the automatic declares from the header files… Do a search either on this forum or the old REALbasic forum…