SketchUp SDK - Getting started issues

Hi! I got access to the C SDK and I’ve spent a lot of time just trying to get something running, but can’t. I’m using Visual Studio 2015, and am trying to run the sample project ReadingFromAskpFile.

I included the path to the SketchUp SDK lib in the Linker input dependencies…here’s the output of my errors. Probably something simple, but I’ve been banging my head against the wall for a while trying to figure out what’s missing.

And here’s the additional dependencies:

Is there anywhere about just setting up a project? I can’t find a single comprehensive thing on it anywhere.This is probably something super simple, so any help would be immensely appreciated. Thanks!

Thanks, not sure how I missed that.

So if I’m using SU2017, I should use VS2015 runtime? Or should I avoid it and use an older version of SU? I guess I’m just confused on what dependencies I need to incorporate - there isn’t really a clear list of dependencies and project setup.

Also, I’m using the SDK - isn’t this for using Ruby?

Yes generally the above examples are for creating a C extension that is loaded into SketchUp’s Ruby subprocess. (But I thought they’d be helpful. BTW, Ruby itself is implemented in C.)


How to setup the SDK is a common question that Thomas has responded to often.
Here are some searches on his two nick’s, the SDK category, and the term “example”:

https://forums.sketchup.com/search?q=example%20%40thomthom%20category%3A14

https://forums.sketchup.com/search?q=example%20%40tt_su%20category%3A14


ping: @thomthom @bugra @Mark

The documentation/sketchup/index.html page in the SDK package lists dependencies:

The C API library for Windows is built using Microsoft Visual Studio 2015 SP1. It includes only 64-bit binaries. Building and releasing an application using the SketchUp C API for Windows requires including SketchUpAPI.dll, which can be found in the SketchUp C SDK for Windows. Also, the following C runtime DLLs must be included: msvcp140.dll and msvcr140.dll. Alternatively the Microsoft Visual C++ 2010 SP1 Redistributable Packages can be used, which can be found here:

Not sure why the ReadingFromAskpFile didn’t build out of the box - need to look into that.

Typically, under Linker > Input > Additional Dependencies I add “SketchUpAPI.lib”. Then under Linker > General > Additional Library Dependencies I add the path to where the .lib file is for that configuration.

From your screenshot it looks like you are configuring the Win32 build to look for the 64bit lib. You want to correct that one.

I’m making notes of this thread - creating an issue to provide better setup guide. Thank you for your feedback.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.