Windows Ruby application with Visual C++ 2008

J

Jari Williamsson

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 Williamsson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top