Today I was finally able to get Visual Studio 2010 Express installed on Windows 10, and working for compiling the SketchUp Ruby C Examples repo. Here’s a brief outline of the steps I went through. Your results may very.
Finally, for the x64 target only I had to set the Platform Toolset from vc100 to Windows7.1SDK. This was due to the linker not finding “kernel32.lib”, which looks like a simple path issue, although I haven’t looked into it yet.
At one time, wasn’t there a batch file (command script) in the VS folder(s) that we needed to run manually, which would set some environment variables for compiling ?
vcvars*.bat is available for building on the command line. Although setting up header and library paths isn’t difficult in the IDE either. The instructions above may be particular to my computer - who knows. It’s just what has worked for me today.
The configuration allows Debug and Release versions, but they are labeled for “Debug (1.8)”, “Debug (2.0)”, “Release (1.8)”, and “Release (2.0)”. I assume that the number is for the Ruby version. Can a simple SUEX_HelloWorld be built with either (1.8) or (2.0) and work on either a Ruby 1.8 or 2.0 system?
You cannot have a Ruby C Extension work on multiple Major/Minor version of Ruby. (Only revision release versions might work.)
So you need one binary per Ruby Major/Minor version and one per bitness. (Exception is OSX where you can have “fat” binaries with both 32bit and 64bit)
The example solution is set up to generate the .so files in separate output folders so you can do a batch build of all release configs.