Installing Visual Studio 2010 Express on Windows 10

Continuing the discussion from Unable to Install Microsoft Visual Studio 2010:

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.

Order is important.

####1. Download & Install VS 2010 Express Edition

Download ISO (source)

The download is an .iso image which needs to be burned to a CD or mounted as a virtual disc drive before it can be installed.

####2. Download & Install WIndows SDK 7.1


However, the SDK would not install and I could not continue until I performed this registry tweak. Do this at your own risk.

Here is the problem dialog:

####3. Download & Install Visual Studio 2010 Service Pack 1

Download VS10sp1-KB983509.exe or ISO

####4. Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1

Download VC-Compiler-KB2519277.exe

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.

Hello, SketchUp!

Hope this helps someone.

1 Like

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.