Test Ruby C Extensions from Visual Studio


#1

Continuing the discussion from Two potential weaknesses with the licensing/scrambling scheme:

Edit your project properties to start the appropriate SketchUp version:


#2

Mine was set to
$(ProgramFiles)\SketchUp\SketchUp 2013\SketchUp.exe
Errors at cannot find or open the PDB file


#3

There are 4 SUEX_HelloWorld.pdb files.


#4

Which PDB file - SketchUp.pdb? That’s expected, it’s asking for the SketchUp debug symbols. It’s just a warning, not an error.


#5

Fair enough.

Then why does the “Hello World” not show.
I also tried it with Sketchup 8
Is there a script I have to run on the sketchup side?


#6

I got it working with Sketchup 2014 and debug(2.0)
I see what is going on now,

Essentially we set up visual studio as a remote debugger for the C/C++ code where we can set break points for the C side of things.

The missing piece was needing to load SwigExample.rb
I can’t stick it in the plugins folder - must be loaded with full path for the rest of it to work out. There is probably a way of doing it at startup - probably throw in a loader script in plugins folder that performs the load the very same way. The difference is we get the benefit of the ruby console in case there is any error loading on the sketchup side.

I think a little picture showing the relationship of the systems would help someone like me - at least the first time through.

Are there more examples a guy can play with - this doesn’t do much.


#7

The SWIG example was added for this specifically looking to use SWIG. The main example for Ruby C++ Extensions is the non-SWIG one.