Custom ruby c++ extension: LoadError: 127 on 2017 but not 2018

I have a custom ruby c++ extension that loads without problems on SU2018 but gives a LoadError: 127 on SU2017 on windows. My SU2017 version is 17.2.2555 Make.

It looks like there is no issue on osx.
This issue seems to be related: Connection to the MS Access datebase

The only difference with another project that does load into SketchUp 2017 is that I link in the 2019 sdk in this project. And, it seems to be related to using the 2019 c sdk since removing all references to it makes the library load under 2017.

Are there ways to download older sdk’s ?

There are some functions in the C API that were renamed ~ the 2017 release (with the old copies / aliases still present for backward compatibility. The note in the "version.txt" file said that the old named functions would be removed in the 2019 release.)

In addition to those, is that new functions get added in newer releases. You cannot call newer functions if running as a “live” extension in older versions.

I state the obvious because on Windows I believe error 127 is ERROR_PROC_NOT_FOUND.
(Ie, The specified procedure could not be found.)


Not that I know of. I’ve tried modifying the download URL to the 2017 release name of the zip, but it no longer works. Apparently only the download link for the latest release works.

For this reason, I myself kept SDK packages for Windows all the way back to 2014 (14.1.1282) mostly for the docs and samples. The packages are too large to post as forum attachments, and I don’t have distribution permission.

Perhaps one of the distributers like @SketchUp3D_de (Posh GmbH) can get it for you ?

Have you read Dale’s SDK thread … “Best practice to support multiple SketchUp versions?”

The other main difference (if making any Ruby C API calls) is that 2017 uses Ruby 2.2.4 and SketchUp 2019 is now up to Ruby 2.5.5. (But 2018 and 2017 both use the same Ruby version.)

The C API is binary backwards compatible. There shouldn’t be any need to use older SDK versions.

But are you using the Live C API?

If so, are you linking against sketchup.lib? (SketchUpAPI.lib should not be used for Live C API access)

Can you provide a minimal example of the issue? (By for example forking the Ruby C Extension example: GitHub - SketchUp/ruby-c-extension-examples: Ruby C extension examples)

2 Likes

I’ll see if I can find some spare time to make an example. Right now I am working on a client’s extension that relies on 3d warehouse… and the changes that were made to it