ArduCam SDK is not compilable in C

Looking at the ArduCam SDK (here), there are C++ language features that will not be compilable in a C compiler, such as

extern "C"{

that are not wrapped around with __cplusplus macro like so:

#ifdef __cplusplus
extern "C" {
#endif

Or functions that are passed by reference such as:

unsigned int ArduCam_autoopen( ArduCamHandle &useHandle, ArduCamCfg *useCfg );
unsigned int ArduCam_readImage( ArduCamHandle useHandle, ArduCamOutData* &pstFrameData );
unsigned int ArduCam_open( ArduCamHandle &useHandle, ArduCamCfg* useCfg, Uint32 usbIdx );
unsigned int ArduCam_getSingleFrame(ArduCamHandle useHandle, ArduCamOutData* &pstFrameData,int time_out = 1500);

where the function parameters are passed by reference & that is not supported in C. If there is another C compatible header I don’t know about please tell me. Else please fix, or do not claim the SDK is C compatible.

Thanks
Chris

@chutsu

The situation you said is indeed possible.
But this repository is no longer maintained.

You can see the new link in the repository’s README

Afraid the problem persists if I install the ArduCam SDK via apt as described in the new SDK demo repos you linked. The header is not C compilable since it still has the issues I mentioned above:

Screenshot from 2023-03-03 02-17-49

@chutsu

Sorry.

Since this library was not fully considered when it was originally designed, if we want to support C now, the changes will be very large.

So currently we do not support the C language version.

I understand, thanks.