# Compiling Ruby + Extensions under the 'Windows SDK'

**URL:** <https://www.ruby-forum.com/t/compiling-ruby-extensions-under-the-windows-sdk/105233>\
**Category:** Ruby\
**Created:** [May 27, 2007, 7:46pm UTC](https://www.ruby-forum.com/t/compiling-ruby-extensions-under-the-windows-sdk/105233 "2007-05-27T19:46:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![axees335](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e68b1a/32.png) [@axees335](https://www.ruby-forum.com/u/axees335)\
**Post date:** [May 27, 2007, 7:46pm UTC](https://www.ruby-forum.com/t/compiling-ruby-extensions-under-the-windows-sdk/105233/1 "2007-05-27T19:46:40Z")

</div>

I’ve been working through a build system with the aim of providing a  
build system which can build ruby (and provide a build environment for  
ruby inline) on win32, using the Windows SDK (the same compiler as vs  
2005).

Ruby itself compiles ok:  
[http://pastie.caboo.se/64459](http://pastie.caboo.se/64459)

I built OpenSSL itself using their own perl script for configuration,  
and then nmake. All tests passed 100%, as build with the Windows SDK.

I setup my path as expected, and try to run extconf.rb in ext/openssl,  
and I get:

E:\dev\build\_system\installer-win2\ruby\src\ruby-1.8.6\ext\openssl\>nmake

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762  
Copyright (C) Microsoft Corporation. All rights reserved.

```
   cl -nologo -I. -I. 

```

-IE:/dev/build\_system/installer-win2/ruby/lib/ruby/1.8/i386-mswin32\_80  
-I. -MD -O2b2xty- -DRUBY\_EXTCONF\_H="extconf.h"  
-IC:/some/openssl/dir/include -IC:/some/openssl/dir/  
include -D\_CRT\_SECURE\_NO\_DEPRECATE -D\_CRT\_NONSTDC\_NO\_DEPRECATE -c  
-Tcossl.c  
ossl.c  
C:/some/openssl/dir/include\openssl/ocsp.h(156) : error C2059: syntax  
error : ‘type’  
C:/some/openssl/dir/include\openssl/ocsp.h(193) : error C2059: syntax  
error : ‘type’  
C:/some/openssl/dir/include\openssl/ocsp.h(399) : error C2059: syntax  
error : ‘type’  
C:/some/openssl/dir/include\openssl/ocsp.h(408) : error C2143: syntax  
error : missing ‘)’ before ‘(’  
C:/some/openssl/dir/include\openssl/ocsp.h(408) : error C2143: syntax  
error : missing ‘)’ before ‘(’  
C:/some/openssl/dir/include\openssl/ocsp.h(408) : error C2091: function  
returns function  
C:/some/openssl/dir/include\openssl/ocsp.h(408) : error C2091: function  
returns function  
… a whole pile of similar stuff, all around OSCP\_REQUEST …

[http://pastie.caboo.se/64648](http://pastie.caboo.se/64648)

I’ve had a good look through the header file, and that seems fine.

I’ve also run it through the pre-processor first, and tried that output  
(to verify that this is not in fact a syntax error):

C:/some/openssl/dir/include\openssl/ocsp.h(447) : error C2059: syntax  
error : ‘type’  
C:/some/openssl/dir/include\openssl/ocsp.h(1908) : error C2059: syntax  
error : ‘type’  
C:/some/openssl/dir/include\openssl/ocsp.h(1918) : error C2059: syntax  
error : ‘type’  
C:/some/openssl/dir/include\openssl/ocsp.h(1975) : error C2059: syntax  
error : ‘type’  
C:/some/openssl/dir/include\openssl/ocsp.h(1981) : error C2143: syntax  
error : missing ‘)’ before ‘(’  
C:/some/openssl/dir/include\openssl/ocsp.h(1981) : error C2143: syntax  
error : missing ‘)’ before ‘(’  
C:/some/openssl/dir/include\openssl/ocsp.h(1981) : error C2091: function  
returns function  
…

[http://pastie.caboo.se/65001](http://pastie.caboo.se/65001)

And we had a look at where OCSP\_REQUEST was coming from, and that it’s  
defined ok:

[http://pastie.caboo.se/64680](http://pastie.caboo.se/64680)

I and a few others are really not sure how to get this to work, so I’m  
asking here and will also be seeking advice over at the openssl lists.

I’ve noticed that the builder for the One-Click Installer has a  
pre-compiled .so, sadly, I’m on the wrong CRT version for that, as I  
lack a copy of VS 6.

Thanks in advance for any help,

raggi.
