Showing posts with label sketchup. Show all posts
Showing posts with label sketchup. Show all posts

August 12, 2011

Compile C++ plug-in for Sketchup

Sketchup crashes when loading a C++ ruby extension. As Dan Rathbun says in for example http://forums.sketchucation.com/viewtopic.php?f=180&t=34735#p306377, you have to compile the extension using ruby 1.8. This solved my problem - I had used ruby 1.9 when I experienced my crashes.

I failed to find a complete how-to for successfully compiling an extension for Sketchup, so here is how I did:
  • now you should have mytest.so in the current directory
  • copy mytest.so to the sketchup Plugins folder - in my case C:\Program Files\Google\Google SketchUp 8\Plugins
  • start sketchup
  • use menu Window/Ruby Console
  • in the ruby console edit field do as the rubyinside.com/how-to... page says:
    • require 'mytest'
    • include MyTest
    • puts test1
  • the last command should print 10