I have started working again on Xojo OpenCV-C, which I haven’t looked at in quite some time. I opened up the project file to find that a lot of what was in there was deprecated. All of that has now been updated.
First, I’ll say that I’ve tried this on both Windows and Mac. (The github repo only has a copy of the mac dylib so anyone testing on Windows would need to build one, or contact me and I can send a copy). This code was written in 2021 and the whole xojo project worked fine back then, except for some unfinished stuff. I’m running it now in Xojo 2023r4.
The problem I see on both platforms is that when I try to click on the LoadImage button, which calls the CVCImread function in the dll/dylib, I get a function not found exception. On my mac, this is what I see in the debugger:
Could not load CVCimread from @executable_path/../Frameworks/libOpenCVC.dylib.
I am using a build step to copy the dylib into the Frameworks folder. When I run the app, and I look inside the debug package, I can see the dylib is where it’s supposed to be, matching the path above:
/Users/perry/Desktop/XOJO_TEMP/openCVDesktop.debug.app/Contents/Frameworks/libOpenCVC.dylib
Similarly, on Windows, I see the DLL file in the App parent folder when debugging, where I have it set to go. So in both cases I know the library is where it’s expected to be, where my app is supposed to look for it.
Any ideas on what might cause this FunctionNotFound error? Could it have something to do with updating everything from the older version? Most of that was about changing the Supers on various controls and windows to the newer Desktop* versions. I get no errors when compiling, nor when I analyze the project, other than some unused variables left over from testing.