# Ncurses-ruby on cygwin

**URL:** <https://rubytalk.org/t/ncurses-ruby-on-cygwin/6533>\
**Category:** ruby-talk\
**Created:** [24 June 2003 05:48 UTC](https://rubytalk.org/t/ncurses-ruby-on-cygwin/6533 "2003-06-24T05:48:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Culley\_harrelson](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Culley\_harrelson](https://rubytalk.org/u/Culley_harrelson)\
**Post date:** [24 June 2003 05:48 UTC](https://rubytalk.org/t/ncurses-ruby-on-cygwin/6533/1 "2003-06-24T05:48:45Z")

</div>

I am trying to install ncurses-ruby on cygwin, which all the docs  
indicate should work just fine. when executing extconf.rb I get:

checking for unistd.h… yes  
checking for /usr/include/ncurses.h… no  
checking for ncurses/curses.h… no  
checking for /usr/include/curses.h… no  
./extconf.rb:35: ncurses header file not found (RuntimeError)

Even though the header file exists in /usr/include

I tried modifying extconf.rb to hard code in the absolute path but that  
didn’t work… what do I need to do to get this to work?

culley

---

<div class="post-metadata">

**Author:** ![Tobias\_Peters1](https://avatars.discourse-cdn.com/v4/letter/t/85e7bf/32.png) [@Tobias\_Peters1](https://rubytalk.org/u/Tobias_Peters1)\
**Post date:** [24 June 2003 08:08 UTC](https://rubytalk.org/t/ncurses-ruby-on-cygwin/6533/2 "2003-06-24T08:08:50Z")

</div>

> I am trying to install ncurses-ruby on cygwin, which all the docs  
> indicate should work just fine.

Yes. Last time I tried, it did work.

> when executing extconf.rb I get:
> 
> checking for unistd.h... yes  
> checking for /usr/include/ncurses.h... no  
> checking for ncurses/curses.h... no  
> checking for /usr/include/curses.h... no  
> ./extconf.rb:35: ncurses header file not found (RuntimeError)
> 
> Even though the header file exists in /usr/include

If it really exists in /usr/include, then it means your compiler does not  
look there.

Maybe you are not using the ruby interpreter built by cygwin. You have to.  
You cannot use cygwin to build ruby extensions for a ruby interpreter  
built with another compiler.

Or you have multiple installations of cygwin.

Try executing extconf.rb as

/usr/local/bin/ruby extconf.rb

from your bash prompt.

&nbsp;&nbsp;Tobias

> **···**
>
> On 24 Jun 2003, culley harrelson wrote:

---

<div class="post-metadata">

**Author:** ![Culley\_harrelson](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Culley\_harrelson](https://rubytalk.org/u/Culley_harrelson)\
**Post date:** [24 June 2003 08:17 UTC](https://rubytalk.org/t/ncurses-ruby-on-cygwin/6533/3 "2003-06-24T08:17:43Z")

</div>

> If it really exists in /usr/include, then it means your compiler does not  
> look there.
> 
> Maybe you are not using the ruby interpreter built by cygwin. You have to.  
> You cannot use cygwin to build ruby extensions for a ruby interpreter  
> built with another compiler.

I have never installed with Win32 Native Ruby-- only Cygwin

> Or you have multiple installations of cygwin.
> 
> Try executing extconf.rb as
> 
> /usr/local/bin/ruby extconf.rb
> 
> from your bash prompt.

Ruby was installed in /usr/bin rather than /usr/local/bin. This  
installation was done using the cygwin setup.exe on June 8 so I am  
fairly current. I have a sym link at /usr/local/bin/ruby because this  
is where it is on my other systems…

culley

---

<div class="post-metadata">

**Author:** ![Tobias\_Peters1](https://avatars.discourse-cdn.com/v4/letter/t/85e7bf/32.png) [@Tobias\_Peters1](https://rubytalk.org/u/Tobias_Peters1)\
**Post date:** [24 June 2003 09:25 UTC](https://rubytalk.org/t/ncurses-ruby-on-cygwin/6533/4 "2003-06-24T09:25:35Z")

</div>

I did not know that cygwin has a ruby package by now. Nice.

What Error message do you get for

bash-2.05b$ cat \>check.c  
#include \<ncurses.h\>  
int main;  
bash-2.05b$ `ruby -r rbconfig -e 'print Config::CONFIG["CC"], " ", Config::CONFIG["CFLAGS"]'` check.c

(produce a check.c file that includes #\<ncurses.h\>; and try to compile  
that file with the C compiler and CFLAGS that ruby knows of.)

Maybe the precompiled ruby from cygwin has problems. You could try to  
recompile ruby yourself.

Tobias

> **···**
>
> On Tue, 24 Jun 2003, culley harrelson wrote
> 
> > Ruby was installed in /usr/bin rather than /usr/local/bin. This  
> > installation was done using the cygwin setup.exe on June 8 so I am  
> > fairly current. I have a sym link at /usr/local/bin/ruby because this  
> > is where it is on my other systems…

---

<div class="post-metadata">

**Author:** ![Culley\_harrelson](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Culley\_harrelson](https://rubytalk.org/u/Culley_harrelson)\
**Post date:** [24 June 2003 10:28 UTC](https://rubytalk.org/t/ncurses-ruby-on-cygwin/6533/5 "2003-06-24T10:28:23Z")

</div>

> What Error message do you get for
> 
> bash-2.05b$ cat \>check.c  
> #include \<ncurses.h\>  
> int main;  
> bash-2.05b$ `ruby -r rbconfig -e 'print Config::CONFIG["CC"], " ", Config::CONFIG["CFLAGS"]'` check.c
> 
> (produce a check.c file that includes #\<ncurses.h\>; and try to compile  
> that file with the C compiler and CFLAGS that ruby knows of.)

This produces:

check.c:1:21: ncurses.h: No such file or directory

ruby is using gcc… gcc check.c produces the same results so maybe it  
has nothing to do with ruby?

> Maybe the precompiled ruby from cygwin has problems. You could try to  
> recompile ruby yourself.

I am stuck in cygwin for another week or two and then I will be back on  
a real unix box-- I will probably just wait.

culley

---

<div class="post-metadata">

**Author:** ![Nobuyoshi\_Nakada](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nobuyoshi\_Nakada](https://rubytalk.org/u/Nobuyoshi_Nakada)\
**Post date:** [26 June 2003 00:44 UTC](https://rubytalk.org/t/ncurses-ruby-on-cygwin/6533/6 "2003-06-26T00:44:36Z")

</div>

Hi,

> **···**
>
> At Tue, 24 Jun 2003 19:28:23 +0900, culley harrelson wrote:
> 
> > check.c:1:21: ncurses.h: No such file or directory
> 
> You don’t install libncurses-devel package.
> 
> –  
> Nobu Nakada
