[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

"gem install ncurses" on Windows

Christopher W,

10/8/2007 8:48:00 AM

(This may not be the right place for RubyGem support. If it is not, a
pointer to the correct location would be nice.)

I am trying to install the ncurses gem on Windows. I installed Ruby
1.8.6 using the 1-click-installer and have gem 0.9.2.

Simply typing "gem install ncurses" resulted in this error:
> ERROR: Failed to build gem native extension.
> ruby extconf.rb install ncurses
> <SNIP>
> extconf.rb:35: ncurses header file not found (RuntimeError)

So, I downloaded, extracted, and compiled PDCurses 3.3 from
http://pdcurses.source... using MSVC 2005 (version 1400 or
something).

After setting my INCLUDE, LIB, and LIBPATH variables to include the
PDCurses files, running "gem install ncurses" produces this:
<SNIP>
> c:\ruby\lib\ruby\1.8\i386-mswin32\config.h(2) : fatal error C1189: #error : MSC version unmatch
<SNIP>

I commented out this error line to see what would happen. I got this:
> nmake
>
> Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> cl -nologo -I. -I. -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -g -DHAVE_CURSES_H -DHAVE_TABSIZE -DHAVE_CURSES_VERSION -DHAVE_TIGETSTR -DHAVE_GETWIN -DHAVE_PUTWIN -DHAVE_UNGETMOUSE -DHAVE_MOUSEMASK -DHAVE_WENCLOSE -DHAVE_MOUSEINTERVAL -DHAVE_WMOUSE_TRAFO -DHAVE_HAS_KEY -DHAVE_DELSCREEN -DHAVE_USE_DEFAULT_COLORS -DHAVE_WRESIZE -DHAVE_ATTR_ON -DHAVE_ATTR_OFF -DHAVE_ATTR_SET -DHAVE_CHGAT -DHAVE_COLOR_SET -DHAVE_FILTER -DHAVE_INTRFLUSH -DHAVE_MVCHGAT -DHAVE_MVHLINE -DHAVE_MVVLINE -DHAVE_MVWCHGAT -DHAVE_MVWHLINE -DHAVE_MVWVLINE -DHAVE_NOQIFLUSH -DHAVE_PUTP -DHAVE_QIFLUSH -DHAVE_SCR_DUMP -DHAVE_SCR_INIT -DHAVE_SCR_RESTORE -DHAVE_SCR_SET -DHAVE_SLK_ATTR_OFF -DHAVE_SLK_ATTR_ON -DHAVE_SLK_ATTR_SET -DHAVE_SLK_COLOR -DHAVE_TIGETFLAG -DHAVE_TIGETNUM -DHAVE_USE_ENV -DHAVE_VIDATTR -DHAVE_VID_ATTR -DHAVE_WATTR_ON -DHAVE_WATTR_OFF -DHAVE_WATTR_SET -DHAVE_WCHGAT -DHAVE_WCOLOR_SET -DHAVE_GETATTRS -DHAVE_ASSUME_DEFAULT_COLORS -DHAVE_ATTR_GET -DHAVE_PANEL_H -c -Tcform_wrap.c
>cl : Command line warning D9035 : option 'Og-' has been deprecated and will be removed in a future release
> cl : Command line warning D9002 : ignoring unknown option '-G6'
> cl : Command line warning D9002 : ignoring unknown option '-g'
> form_wrap.c
> cl -nologo -I. -I. -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -g -DHAVE_CURSES_H -DHAVE_TABSIZE -DHAVE_CURSES_VERSION -DHAVE_TIGETSTR -DHAVE_GETWIN -DHAVE_PUTWIN -DHAVE_UNGETMOUSE -DHAVE_MOUSEMASK -DHAVE_WENCLOSE -DHAVE_MOUSEINTERVAL -DHAVE_WMOUSE_TRAFO -DHAVE_HAS_KEY -DHAVE_DELSCREEN -DHAVE_USE_DEFAULT_COLORS -DHAVE_WRESIZE -DHAVE_ATTR_ON -DHAVE_ATTR_OFF -DHAVE_ATTR_SET -DHAVE_CHGAT -DHAVE_COLOR_SET -DHAVE_FILTER -DHAVE_INTRFLUSH -DHAVE_MVCHGAT -DHAVE_MVHLINE -DHAVE_MVVLINE -DHAVE_MVWCHGAT -DHAVE_MVWHLINE -DHAVE_MVWVLINE -DHAVE_NOQIFLUSH -DHAVE_PUTP -DHAVE_QIFLUSH -DHAVE_SCR_DUMP -DHAVE_SCR_INIT -DHAVE_SCR_RESTORE -DHAVE_SCR_SET -DHAVE_SLK_ATTR_OFF -DHAVE_SLK_ATTR_ON -DHAVE_SLK_ATTR_SET -DHAVE_SLK_COLOR -DHAVE_TIGETFLAG -DHAVE_TIGETNUM -DHAVE_USE_ENV -DHAVE_VIDATTR -DHAVE_VID_ATTR -DHAVE_WATTR_ON -DHAVE_WATTR_OFF -DHAVE_WATTR_SET -DHAVE_WCHGAT -DHAVE_WCOLOR_SET -DHAVE_GETATTRS -DHAVE_ASSUME_DEFAULT_COLORS -DHAVE_ATTR_GET -DHAVE_PANEL_H -c -Tcncurses_wrap.c
> cl : Command line warning D9035 : option 'Og-' has been deprecated and will be removed in a future release
> cl : Command line warning D9002 : ignoring unknown option '-G6'
> cl : Command line warning D9002 : ignoring unknown option '-g'
> ncurses_wrap.c
> C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\wincon.h(101) : warning C4005: 'MOUSE_MOVED' : macro redefinition
> C:\pdcurses\curses.h(158) : see previous definition of 'MOUSE_MOVED'
> C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\Include\io.h(318) : error C2375: 'close' : redefinition; different linkage
> c:\ruby\lib\ruby\gems\1.8\gems\ncurses-0.9.1\ncurses_wrap.h(71) : see declaration of 'close'
> C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\Include\io.h(320) : error C2375: 'dup' : redefinition; different linkage
> c:\ruby\lib\ruby\gems\1.8\gems\ncurses-0.9.1\ncurses_wrap.h(70) : see declaration of 'dup'
> ncurses_wrap.c(1267) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
> ncurses_wrap.c(1267) : warning C4024: 'rb_str_new2' : different types for formal and actual parameter 1
> ncurses_wrap.c(2071) : warning C4087: 'getmouse' : declared with 'void' parameter list
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\Bin\cl.EXE"' : return code '0x2'
> Stop.

What should I try next? Has anyone successfully installed the ncurses
gem on Windows? Am I event headed in the right direction?
--
Posted via http://www.ruby-....

2 Answers

Eric Hodel

10/8/2007 4:36:00 PM

0

On Oct 8, 2007, at 01:48 , Christopher W, wrote:
> (This may not be the right place for RubyGem support. If it is not, a
> pointer to the correct location would be nice.)
>
> I am trying to install the ncurses gem on Windows. I installed Ruby
> 1.8.6 using the 1-click-installer and have gem 0.9.2.
>
> Simply typing "gem install ncurses" resulted in this error:
>> ERROR: Failed to build gem native extension.
>> ruby extconf.rb install ncurses
>> <SNIP>
>> extconf.rb:35: ncurses header file not found (RuntimeError)
>
> So, I downloaded, extracted, and compiled PDCurses 3.3 from
> http://pdcurses.source... using MSVC 2005 (version 1400 or
> something).

You'll need MSVC6 to link correctly. Somebody more familiar with the
inner workings of Windows compiling will probably pop in and tell you
why RSN.

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars



Daniel Berger

10/8/2007 5:47:00 PM

0



On Oct 8, 10:35 am, Eric Hodel <drbr...@segment7.net> wrote:
> On Oct 8, 2007, at 01:48 , Christopher W, wrote:
>
> > (This may not be the right place for RubyGem support. If it is not, a
> > pointer to the correct location would be nice.)
>
> > I am trying to install the ncurses gem on Windows. I installed Ruby
> > 1.8.6 using the 1-click-installer and have gem 0.9.2.
>
> > Simply typing "gem install ncurses" resulted in this error:
> >> ERROR: Failed to build gem native extension.
> >> ruby extconf.rb install ncurses
> >> <SNIP>
> >> extconf.rb:35: ncurses header file not found (RuntimeError)
>
> > So, I downloaded, extracted, and compiled PDCurses 3.3 from
> >http://pdcurses.sourceforge... MSVC 2005 (version 1400 or
> > something).
>
> You'll need MSVC6 to link correctly. Somebody more familiar with the
> inner workings of Windows compiling will probably pop in and tell you
> why RSN.

My guess would be that he needs to pass a "--with-ncurses-dir=C:/path/
to/ncurses" directive so that the bindings can find the header files
they need. I can't remember how you do that with gems. Just tack it on
at the end?

Regards,

Dan