I am trying to build a .skp file reader for my application. The reader will be a plugin for my application in the form of a dynamic library which uses the SketchUpAPI to read the data.
My application is built using Qt and I use the Qt Creator IDE for development. The platform is OS X 10.11.3, currently using Qt 5.4.1 and clang with Xcode 7.2.
I am new to the SDK and need some advice about building for it with Qt Creator and qmake. Firstly, I would like to know the best way to deal with the include path used in the API headers. For example…
#include <SketchUpAPI/common.h> is used in many include files.
The “SketchUpAPI” bit refers to the path to the the header files but how do tell qmake where this is, use an alias perhaps? or is there a better way?
Secondly, I get a linker error when I try to link to the SketchUpAPI.framework. The linker says it cannot find the framework. I use the following settings in the Qt .pro file…
QMAKE_LFLAGS += …/…/SDK_Mac_16-0-19913
LIBS += -framework SketchUpAPI
Which is the recommended way to do it but it does not find the framework. The linker error is…
ld: framework not found SketchUpAPI
If the path was wrong I would a “error: no such file or directory:…” type error so I don’t think it is a problem with the path.
Is this a problem with the structure of the framework, or am I doing something wrong?
I will be very grateful for any advice on this.