# Building extensions under Windows

**URL:** <https://rubytalk.org/t/building-extensions-under-windows/1537>\
**Category:** ruby-talk\
**Created:** [3 September 2002 12:00 UTC](https://rubytalk.org/t/building-extensions-under-windows/1537 "2002-09-03T12:00:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harry\_Ohlsen2](https://avatars.discourse-cdn.com/v4/letter/h/958977/32.png) [@Harry\_Ohlsen2](https://rubytalk.org/u/Harry_Ohlsen2)\
**Post date:** [3 September 2002 12:00 UTC](https://rubytalk.org/t/building-extensions-under-windows/1537/1 "2002-09-03T12:00:59Z")

</div>

I’m sure this has been discussed a hundred times, but searching for "cygwin"  
in the Ruby-Talk archive gives a million results. I’d appreciate it if  
someone could point me at an appropriate archive entry.

What I’m trying to do is build the calendar extension for a mate of mine.  
When I run “ruby install.rb config” the Makefile it generates contains what  
look like Microsoft command-line compiler commands.

Does this imply that the extensions can only be built with VC, or is there  
some way to tell it I have cygwin (and hence gcc) installed and that it  
should generate a Makefile that uses cygwin?

Thanks in advance,

Harry O.

---

<div class="post-metadata">

**Author:** ![Pierre\_Brengard](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@Pierre\_Brengard](https://rubytalk.org/u/Pierre_Brengard)\
**Post date:** [3 September 2002 12:26 UTC](https://rubytalk.org/t/building-extensions-under-windows/1537/2 "2002-09-03T12:26:06Z")

</div>

That’s not possible.  
If your Ruby.exe is compiled with MSVC, hence MSVCRT.LIB (MSVC or mingw),  
you MUST use MSVC or mingw.  
So, trust your Ruby installation and your rubyconf.rb file and use it  
your build your makefiles.

If cannot afford MSVC, use mingw and try to download the MSVCRT.LIB  
somewhere.

Pierre Brengard

Harry Ohlsen wrote:

> **···**
>
> > I’m sure this has been discussed a hundred times, but searching for “cygwin”  
> > in the Ruby-Talk archive gives a million results. I’d appreciate it if  
> > someone could point me at an appropriate archive entry.
> > 
> > What I’m trying to do is build the calendar extension for a mate of mine.  
> > When I run “ruby install.rb config” the Makefile it generates contains what  
> > look like Microsoft command-line compiler commands.
> > 
> > Does this imply that the extensions can only be built with VC, or is there  
> > some way to tell it I have cygwin (and hence gcc) installed and that it  
> > should generate a Makefile that uses cygwin?
> > 
> > Thanks in advance,
> > 
> > Harry O.
