Skip to content

Getting a ruby C extension to compile on Windows Part 2

In a previous post I mentioned how to get the Ruby C extension to compile under Windows using Visual Studio Express/Studio 2005. However, I left out an important part regarding manifests which have been part of the development process in VC++7 and above.

Manifests are some XML representation of the bindings and and activation (whatever that means) for many things such as classes, libraries, and assemblies. It boils down to you need one if you’re going to deploy a library (DLL) or executable (EXE) made with VC++ 2005. The manifests by default will go into a file called .manifest however for our purposes we will need to embed it into the library (in this case it is a .so not a .dll).

Here’s the howto:

C:\exttest>mt.exe -manifest;2
C:\exttest>nmake install
irb(main):002:0> require 'my_test'
=> true

The main thing you need to remember is (don’t forget the 2!!)
mt.exe -manifest;2


Be Sociable, Share!