hi all:
i have some functions already in c, and want to provide ruby interfaces that can be used in sketchup 2014’s ruby console. os is win7
what i am done:
use ruby-2.0.0-p247/build/bin/ruby.exe extconf.rb to generate a dll ( ext_ruby.so )
ruby-2.0.0-p247/build/bin/irb
require ‘somepath/ext_ruby’ work
but when load ext_ruby.so in sketchup’s console.
it compains error 126.
and copy msvcr90-ruby200.dll to c:/program files(x86)/sketchup/sketchup2014 folder
it complains incompatible library version
so, some one give me a direction ? or there have a tutorial do the same thing ?
many thanks
Hi!
I’ve written a C program which runs good as an exe, and would like to create a Sketchup Extension from it… I’ve tried to start with the github HelloWorld project, but did not manage to create the appropriate rb file to get it work… I recieve an error message:
Error: 193: %1 ist keine zulässige Win32-Anwendung. - path of .so file
which means “is no valid” Win-32 application…
Thanks Jim,
In fact I’m able to run the exe file even from ruby console in SU with “system”, but I’d like to go a step further…
… to be able to “require” the compiled executable and to run a specific command in it. (and passing arguments like in the su_create_layout_file extension…)
I’m not a “real software engineer”, so it might still be that your hint to win32 and win64 is correct…
I can run my plugin for SU2016 with Ruby 2.0, but I can’t get past the error above with SU2017. I am using Ruby 2.0 Framework for SU2016, and Ruby 2.2 for SU2017. I have tried as much as possible to emulate the settings and use files from this project: GitHub - SketchUp/ruby-c-extension-examples: Ruby C extension examples