C extensions in Vista

I’m posting this to document this effort (for me, and any other poor
soul who has to do this…)
After some painful trial and error, I finally figured out how to do
this…

The key was discovering Al Hoeng’s post:
http://blogs.law.harvard.edu/hoanga/2006/12/14/getting-a-ruby-c-extension-to-compile-on-windows/

He tells you to download and install the Windows SDK, but his link is
now broken.
…hey, it’s ok, he wrote that awhile ago!:slight_smile:

Since I have Vista, I poked around Microsoft and found this one:
http://www.microsoft.com/downloads/details.aspx?familyid=ff6467e6-5bba-4bf5-b562-9199be864d29&displaylang=en

It is over 1GB, so it does take awhile.
…btw: the download worked better using IE (go figure!)

Now I had already tried Visual Studio Express 2008 (and 2005) and had
edited the config.h file.
…I haven’t figured out yet if those steps are really required or
not…

and then it worked!
by that I mean, I compiled and ran the example in Programming Ruby.

Note: I did NOT have to create the manifest manually as described in
Al’s part 2 posting:
http://blogs.law.harvard.edu/hoanga/2006/12/19/getting-a-ruby-c-extension-to-compile-on-windows-part-2/

=================
so, I’m now off to see what else I can compile!!!
…maybe something real…

Hi,

At Sun, 18 Jan 2009 07:29:29 +0900,
Doug wrote in [ruby-talk:325228]:

Now I had already tried Visual Studio Express 2008 (and 2005) and had
edited the config.h file.
…I haven’t figured out yet if those steps are really required or
not…

Editing config.h is an autogenerated file and you must not edit
it.