XCode build error for C API on MAC OSX


Hi Experts,

I am trying to use the MAC SketchUp C API in SketchUp-SDK-Mac with the version 2015.2.2. But I get the build error. Please see the following snapshot for the detailed build error. Is it caused by my wrong use for the SketchUp SDK?

My application tries to link all SketchUp libraries in “\SketchUp-SDK-Mac\slapi.framework\Versions\A\Libraries” by “Build Settings->Linking->Other Linker Flags” in the XCode project config.

The SketchUp libraries name: libCommonGeometry.dylib, libCommonGeoutils.dylib, libCommonImage.dylib, libCommonInternet.dylib, libCommonUnits.dylib, libCommonUtils.dylib, libCommonZip.dylib.

My XCode version: 6.1.1
My OSX version: 10.10.2

Attach my application: hello.zip (36.8 KB) .


Hi Justin,

You should just need to include the slapi framework in your Xcode project in order for it to link properly. Have you compared your build settings to one of the sample projects in the SDK?



Hi Paul,

I included the slapi framework in the attached “HelloS” XCode project HelloS.zip (24.9 KB) by “Build Phases->Link Binary With Libraries”. But there is the same build error. Also, one new link warning appears as follows.

I also tried to compare the project build settings with the sample project “/samples/C++/xml_to_skp/mac/XmlImporter.xcodeproj” in the SDK. There is no big difference. I have no idea why the build is failed.



Hi Justin-

Have you tried downloading a new copy of the slapi framework? I suspect that your files may have become corrupted somehow. The slapi framework should be fine for 64-bit compilation.

I looked at your project file, and it’s mostly correct. You should remove the extra libraries from the “Other linker flags” section - it should be enough to have slapi.framework in your “Build Phases -> Link binary with Libraries” step. Generally you shouldn’t need to explicitly link against any binaries inside a framework.



Hi Marc,

I try to download the new SketchUp SDK. I also remove the extra libraries from “Other linker flags” section. There is still the same build error. Till now, I am not sure whether the build error is related with my Xcode and OSX version or not. I will check further. Anyway, thank you.

My XCode version: 6.1.1
My OSX version: 10.10.2



You may want to try fixing the two warnings in your project - Xcode may be getting confused by those warnings and the link error is just the downstream effect.

Keep us posted on your progress.



I am having the identical problem with the Mac OSX sample project WritingToAskpFile.xcode. The framework is in the project but paths are not recognized for the include header files. If I explicity add a search path to the header files, then they are recognized.

However, the same is not true for the dylibs which is why the link part of the process fails.

Can someone on the Sketchup end try downloading and building any xcode project from the Mac SDK and see if indeed the zip file on the web site is okay,



I think I found the problem. The XMLExporter XCODE project builds just fine. The SkpReader and SkpWriter projects do no build properly. I will investigate this and report back



This is a separate issue, but I can see it as well in the ReadingFromAskpFile and WritingToAskpFile projects. Looks like we accidentally released the project file with a framework path that points to a developer’s user folder!

To fix this problem, go into the “Build Settings” for the “ReadingFromAskpFile” project, and look for “Framework search paths”. Replace the path that contains “bbarin” with this “…/…/…/”. This setting will tell Xcode that slapi.framework can be found three levels down from the location of the project file.

I’ll let the extensibility team know that we have an issue there, thanks for reporting it.



Hi Marc,

Yes I discovered this as well. I replaced the developers path with the line:


And everything works fine now. Thanks


Well this is embarrassing. Xcode has a way of inserting full paths into these fields behind your back and I missed it. :angry:
Sorry about that.