------extPart_001_0002_01C086C3.F06E5080
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I was more looking to create extensions using microsoft C tools/compiler,ny
good references ?

Andres



----- Original Message -----
From: Agnot Tok
Sent: Thursday, January 25, 2001 5:24 AM
To: ruby-talk / netlab.co.jp
Subject: [ruby-talk:9858] re: win32 - how to extension


Hi Andres,

>Anyone have procedures to create an extension for ruby within the win32
>environment.
>Which compiler, version, and other necessities.
>
Well, I've been using Cygwin. It's easy and hasslefree and works "out of the
box". See www.cygwin.com.

But it should work also with other win32 compilers/ides like MS VC++.
General rule is that if you can download and compile ruby then it will work
doing extensions.

Steps when the tools are there:

1. Create your extension in C. You must:
     a, #include "ruby.h"
     b, void Init_XXX() {
         // Make your C funcs known to Ruby, create classe etc
        }

2. Create extconf.rb file. Minimal is:
     require 'mkmf'
     create_makefile('XXX')

3. Run "ruby extconf.rb" to generate Makefile

4. make

5. make install (if no errors...)

For details see README.EXT in ruby tarball. Also download an extension from
RAA and take a look.

Regards,

Agnot

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.<br clear=all><hr>Get your FREE download of MSN Explorer at http://explorer.msn.com<br></p>

------extPart_001_0002_01C086C3.F06E5080
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<HTML><BODY STYLE="font:10pt verdana; border:none;"><DIV>I was more looking to create extensions using microsoft C tools/compiler, any</DIV> <DIV>good references ?</DIV> <DIV>&nbsp;</DIV> <DIV>Andres<BR></DIV> <DIV><BR></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt Arial">----- Original Message -----</DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt Arial; FONT-COLOR: black"><B>From:</B>&nbsp;Agnot Tok</DIV> <DIV style="FONT: 10pt Arial"><B>Sent:</B>&nbsp;Thursday, January 25, 2001 5:24 AM</DIV> <DIV style="FONT: 10pt Arial"><B>To:</B>&nbsp;ruby-talk / netlab.co.jp</DIV> <DIV style="FONT: 10pt Arial"><B>Subject:</B>&nbsp;[ruby-talk:9858] re: win32 - how to extension</DIV>DIV><BR></DIV>Hi Andres,<BR><BR>&gt;Anyone have procedures to create anxtension for ruby within the win32<BR>&gt;environment.<BR>&gt;Which compiler, version, and other necessities.<BR>&gt;<BR>Well, I've been using Cygwin. It's easy and hasslefree and works "out of the<BR>box". See www.cygwin.com.<BR><BR>But it should work also with other win32 compilers/ides like MS VC++.<BR>General rule is that if you can download and compile ruby then it will work<BR>doing extensions.<BR><BR>Steps when the tools are there:<BR><BR>1. Create your extension in C. You must:<BR>&nbsp;&nbsp;&nbsp;&nbsp; a, #include "ruby.h"<BR>&nbsp;&nbsp;&nbsp;&nbsp; b, void Init_XXX() {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Make your Cuncs known to Ruby, create classe etc<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR><BR>2. Create extconf.rb file. Minimal is:<BR>&nbsp;&nbsp;&nbsp;&nbsp; require 'mkmf'<BR>&nbsp;&nbsp;&nbsp;&nbsp; create_makefile('XXX')<BR><BR>3. Run "ruby extconf.rb" to generate Makefile<BR><BR>4. make<BR><BR>5. make install (if no errors...)<BR><BR>For details see README.EXT in ruby tarball. Also download an extension from<BR>RAA and take a look.<BR><BR>Regards,<BR><BR>Agnot<BR><BR>_________________________________________________________________________<BR>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.<BR><BR><BR> <DIV></DIV></BLOCKQUOTE></BODY></HTML><DIV><BR><br clear=all><hr>Get your FREE download of MSN Explorer at http://explorer.msn.com<br></p></DIV>

------extPart_001_0002_01C086C3.F06E5080--