# Installing SWIG on Windows For Ruby 1.8.6

**URL:** <https://www.ruby-forum.com/t/installing-swig-on-windows-for-ruby-1-8-6/166281>\
**Category:** Ruby\
**Created:** [April 23, 2009, 1:16pm UTC](https://www.ruby-forum.com/t/installing-swig-on-windows-for-ruby-1-8-6/166281 "2009-04-23T13:16:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [April 23, 2009, 1:16pm UTC](https://www.ruby-forum.com/t/installing-swig-on-windows-for-ruby-1-8-6/166281/1 "2009-04-23T13:16:06Z")

</div>

Hello Everyone…

I m running on windows and i have Ruby 1.8.6 installed.

now i would like to use SWIG for creating Ruby Extension in C.

i have googled that how to use and how to install SWIG on Windows.

but they were out dated…

Any Links to install SWIG and how to use SWIG for Ruby 1.8.6 on Windows

i m really expecting your valuable help in this regard…

Kindly Advice me…

Thanks a bunch

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [April 23, 2009, 10:56pm UTC](https://www.ruby-forum.com/t/installing-swig-on-windows-for-ruby-1-8-6/166281/2 "2009-04-23T22:56:06Z")

</div>

Newb N. wrote:

> I m running on windows and i have Ruby 1.8.6 installed.
> 
> now i would like to use SWIG for creating Ruby Extension in C.
> 
> i have googled that how to use and how to install SWIG on Windows.

The first result from:  
[http://www.google.com/search?q=swig+install+windows](http://www.google.com/search?q=swig+install+windows)

is: [Download SWIG](http://www.swig.org/download.html)

which says  
“Windows users should download swigwin-1.3.39 which includes a prebuilt  
executable”

This is the correct advice.

Download the zip file and unpack it. In it you’ll swig.exe. You can then  
run swig like this “C:/path/to/swig.exe …” or add the unpacked  
directory to your PATH environment variable if you want to be able to  
just type “swig …”

Then all you have to do is figure out SWIG. The docs are pretty dense  
but have a reasonable introduction to the basics and some ruby-specific  
issues.

[http://www.swig.org/Doc1.3/Ruby.html](http://www.swig.org/Doc1.3/Ruby.html)

As it gets more complex, other good sections to read are ‘swig basics’,  
‘typemaps’, and, if you’re dealing with C++ objects, possibly  
cross-language polymorphism in the Python section.

[http://www.swig.org/Doc1.3/SWIG.html](http://www.swig.org/Doc1.3/SWIG.html)  
[http://www.swig.org/Doc1.3/Typemaps.html](http://www.swig.org/Doc1.3/Typemaps.html)  
[http://www.swig.org/Doc1.3/Python.html#Python\_directors](http://www.swig.org/Doc1.3/Python.html#Python_directors)

hth  
alex
