Compiling the Canon SDK on macOS

133 views Asked by At

I'm trying to compile a very basic program (for the first time) on macOS. The program was written on windows with the help of the Canon SDK. This SDK is available for Windows as well as for macOS. There is however an issue I'm coming against. The SDK consists of 3 header files and a linker file ( .lib for windows and .framework for mac). As I never worked with macOS I first had to figure out how to link the .framework file.

OSX How to compile a framework using GCC/G++ sitting in a current working directory or subdirectory C/C++

This is the solution I found here.

However, I still run into an issue. In one of the files (EDSDK.h) there is an include of windows.h.

Actual code:

#ifdef __MACOS__
   #include <CoreFoundation/CoreFoundation.h>
#else
   #include <windows.h> <--Error
#endif

This include gives me an error as there is no window.h on the macOS. After some searching, I came across this question: Where can I get windows.h for Mac?

Where the answer suggests making a dummy windows.h and one by one satisfy the missing definitions. This however was impossible as the SDK uses too much definitions from windows.h ( and other files included in the windows.h ) to be viable.

How do I go about compiling my program that uses the Canon SDK. Do I setup a dual boot setup and link to the actual windows.h?

0

There are 0 answers