# Can RubyInline and Cygwin's gcc work together?

**URL:** <https://www.ruby-forum.com/t/can-rubyinline-and-cygwins-gcc-work-together/104576>\
**Category:** Ruby\
**Created:** [May 19, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/can-rubyinline-and-cygwins-gcc-work-together/104576 "2007-05-19T20:01:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eipipuz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/bbe5ce/32.png) [@eipipuz](https://www.ruby-forum.com/u/eipipuz)\
**Post date:** [May 19, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/can-rubyinline-and-cygwins-gcc-work-together/104576/1 "2007-05-19T20:01:08Z")

</div>

Hi, I’m trying to use RubyInline in winxp. I discovered that one needs  
to create a HOME environment variable and install a c/c++ compiler.  
Therefore, I installed cygwin and it’s gcc. Do anyone knows how to mix  
gcc with RubyInline? I installed it with a plain “gem install  
rubyinline”.

I have ruby 1.8.5 and rubyinline 3.6.3.

---

<div class="post-metadata">

**Author:** ![eipipuz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/bbe5ce/32.png) [@eipipuz](https://www.ruby-forum.com/u/eipipuz)\
**Post date:** [May 19, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/can-rubyinline-and-cygwins-gcc-work-together/104576/2 "2007-05-19T21:23:17Z")

</div>

On 5/19/07, Guillermo A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi, I’m trying to use RubyInline in winxp. I discovered that one needs  
> to create a HOME environment variable and install a c/c++ compiler.  
> Therefore, I installed cygwin and it’s gcc. Do anyone knows how to mix  
> gcc with RubyInline? I installed it with a plain “gem install  
> rubyinline”.
> 
> I have ruby 1.8.5 and rubyinline 3.6.3.

If you are trying to use RubyInline from the Cygwin Ruby interpreter,  
then all should work well. However, if you are using the Windows  
one-click installer, then RubyInline is not going to work in the  
configuration you described.

RubyInline uses the configuration and compilation settings from the  
Ruby interpreter to find the compiler and compile options. The Windows  
one-click installer was compiled using Microsoft’s Visual C++ 6.0  
compiler suite. You will need this compiler installed on your machine  
to use RubyInline. The Cygwin gcc compiler will not work for you.

Blessings,  
TwP

---

<div class="post-metadata">

**Author:** ![eipipuz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/bbe5ce/32.png) [@eipipuz](https://www.ruby-forum.com/u/eipipuz)\
**Post date:** [May 19, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/can-rubyinline-and-cygwins-gcc-work-together/104576/3 "2007-05-19T21:42:43Z")

</div>

Tim P. wrote:

> RubyInline uses the configuration and compilation settings from the  
> Ruby interpreter to find the compiler and compile options. The Windows  
> one-click installer was compiled using Microsoft’s Visual C++ 6.0  
> compiler suite. You will need this compiler installed on your machine  
> to use RubyInline. The Cygwin gcc compiler will not work for you.
> 
> Blessings,  
> TwP

Is there a way I could setup RubyInline to use a different  
configuration? If not, maybe I should try to give a patch or something.  
It’s strange to have a compiler hardwired. Thanks.

ps. The sad thing is that I come to this only because I tried to play  
with ruby2ruby…

---

<div class="post-metadata">

**Author:** ![eipipuz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/bbe5ce/32.png) [@eipipuz](https://www.ruby-forum.com/u/eipipuz)\
**Post date:** [May 19, 2007, 10:23pm UTC](https://www.ruby-forum.com/t/can-rubyinline-and-cygwins-gcc-work-together/104576/4 "2007-05-19T22:23:25Z")

</div>

On 5/19/07, Guillermo A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there a way I could setup RubyInline to use a different  
> configuration? If not, maybe I should try to give a patch or something.  
> It’s strange to have a compiler hardwired. Thanks.

If you’re on Windows, then you’ll need to use the mingw compilers.  
They will generate a shared library that is compatible with the  
Windows DLL world.

You can tell RubyInline to use a different compiler. This is done by  
hacking the rbconfig.rb file located in your Ruby installation. On my  
Windows box this is:

C:\Program Files\ruby\lib\ruby\1.8\i386-mswin32\rbconfig.rb

Have fun!

TwP
