# Windows Ruby application with Visual C++ 2008

**URL:** <https://www.ruby-forum.com/t/windows-ruby-application-with-visual-c-2008/122850>\
**Category:** Ruby\
**Created:** [December 12, 2007, 6:52pm UTC](https://www.ruby-forum.com/t/windows-ruby-application-with-visual-c-2008/122850 "2007-12-12T18:52:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jari\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@Jari\_W](https://www.ruby-forum.com/u/Jari_W)\
**Post date:** [December 12, 2007, 6:52pm UTC](https://www.ruby-forum.com/t/windows-ruby-application-with-visual-c-2008/122850/1 "2007-12-12T18:52:15Z")

</div>

I’m trying to create a standalone Windows program to run some Ruby  
scripts (pretty much as the examples in the Pickaxe book), but I have  
some troubles when ruby.h is included. I downloaded the free Visual C++  
2008 Express Edition, and building Ruby from sources (Ruby 1.86-p111)  
was no problem at all and extremely straight-forward with this version.

But when creating an application in the IDE, I get some compiling errors  
when I include ruby.h. It doesn’t matter if I enclose the include in  
extern “C” or not, same errors. For example:

c:\rubysources\ruby-1.8.6-p111\win32\win32.h(172) : error C2061: syntax  
error : identifier ‘fd\_set’

c:\rubysources\ruby-1.8.6-p111\win32\win32.h(188) : error C2146: syntax  
error : missing ‘;’ before identifier ‘rb\_w32\_get\_osfhandle’

c:\rubysources\ruby-1.8.6-p111\win32\win32.h(188) : error C4430: missing  
type specifier - int assumed. Note: C++ does not support default-int

Since I can build from sources with nmake, it must be a matter of  
configuration, right?

Ideas anyone?

Best regards,

Jari W.
