Compiling FXRuby-1.0.17 under cygwin

I’m having trouble compiling FXRuby under cygwin. here’s the error i’m
getting, then i’ll explain a little more about my setup:

$ ruby install.rb setup
install.rb: entering setup phase…
—> lib
—> lib/fox
<— lib/fox
<— lib
—> ext
—> ext/fox
make
g+±2 -DUSEIMPORTLIB -g -O2 -fno-strict-prototype -fpermissive
-DWIN32 -Iinclude -I. -I/usr/local/lib/ruby/1.6/i686-cygwin
-I/tmp/FXRuby-1.0.17/ext/fox -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H
-I/usr/local/include -I/usr/local/include/fox -c -o FXRuby.o
FXRuby.cpp
In file included from FXRuby.cpp:49:
/usr/local/lib/ruby/1.6/i686-cygwin/rubyio.h:27: typedef struct WIN32_OpenFileWIN32_OpenFile' redeclared as different kind of symbol /usr/include/w32api/winbase.h:1418: previous declaration ofHFILE
WIN32_OpenFile(const CHAR *, _OFSTRUCT *, unsigned int)‘
FXRuby.cpp: In function void * FXRbGetReadFileHandle(long unsigned int)': FXRuby.cpp:172: typeWIN32_OpenFile’ is not a base type for type
OpenFile' FXRuby.cpp: In functionvoid * FXRbGetWriteFileHandle(long unsigned
int)’:
FXRuby.cpp:189: type WIN32_OpenFile' is not a base type for typeOpenFile’
make: *** [FXRuby.o] Error 1
setup failed
’system make’ failed
try ‘ruby install.rb --help’ for usage

···

this is running with ruby-1.6.8 (compiled under the latest cygwin too,
plus i’ve tried it with ruby 1.8.0 with the same results). I’ve
modified the Makefiles in FXRuby to use gcc-2/g+±2 (cygwin now
defaults to gcc-3.2), but this hasn’t helped at all either

anyone have any ideas?

thanks

  • James

I got the same error using 1.8, but I dropped 1.8 and just installed the
Andy Hunt prebuilt binary version and got FXRuby pre-installed. It was a
lot easier than trying to come up with a solution to this.

Speaking of FxRuby, are you (or anyone else) just using FOX’s C++ docs and
mentally translating it to ruby to figure out how to do things? Coupled
with reading the examples? That’s what I’m doing at the moment, but if
there’s a nother source of ruby-esque docs, I’d love to know about it.

Joey

···

On Tue, 14 Jan 2003 22:54:30 +0900, james@lazyatom.com (James Adam) wrote:

I’m having trouble compiling FXRuby under cygwin. here’s the error i’m
getting, then i’ll explain a little more about my setup:

James Adam wrote:

I’m having trouble compiling FXRuby under cygwin. here’s the error i’m
getting, then i’ll explain a little more about my setup:

Well, rats. I see what I did wrong. Please take a look at this file:

 FXRuby-1.0.17/ext/fox/include/FXRbCommon.h

and change line 62 from this:

 #undef WIN32_OpenFile

to this:

 #undef OpenFile

After this fix, it should compile fine under Cygwin. Sorry about that.

Speaking of FxRuby, are you (or anyone else) just using FOX’s C++ docs and
mentally translating it to ruby to figure out how to do things? Coupled
with reading the examples? That’s what I’m doing at the moment, but if
there’s a nother source of ruby-esque docs, I’d love to know about it.

Hi Joey :slight_smile:

At the moment that is what most people are doing, coupled with sometimes
looking in the C++ source code. (For instance I had to go digging to
find that when text is entered into a TextArea it raises a SEL_INSERTED
event, whereas a TextField raises a SEL_CHANGED event)

Lyle (the FXRuby maintainer) is working on building up a “proper” set of
documentation for FXRuby though but its slow going I believe.

Rob

Hi Joey :slight_smile:

It’s funny how aquaintences pop up in different places… :sunglasses:

At the moment that is what most people are doing, coupled with sometimes
looking in the C++ source code. (For instance I had to go digging to

That’s what I figured. I did get a minimal UI built yesterday during lunch
that is almost there, but it was all from example-reading and stuff at
fox-toolkit.org. Then I discovered FXDataTargets (very similar to
Smalltalk’s adaptors) and started rewriting it…

Lyle (the FXRuby maintainer) is working on building up a “proper” set of
documentation for FXRuby though but its slow going I believe.

I can imagine it’s a daunting task, that.

Joey

···

On Tue, 14 Jan 2003 23:44:24 +0900, Robert McGovern robertm@spellmanhv.co.uk wrote:

Hi Joey :slight_smile:

It’s funny how aquaintences pop up in different places… :sunglasses:

At the moment that is what most people are doing, coupled with
sometimes looking in the C++ source code. (For instance I had to go
digging to

That’s what I figured. I did get a minimal UI built yesterday during
lunch that is almost there, but it was all from example-reading and
stuff at fox-toolkit.org. Then I discovered FXDataTargets (very similar
to Smalltalk’s adaptors) and started rewriting it…

Lyle (the FXRuby maintainer) is working on building up a “proper”
set of documentation for FXRuby though but its slow going I believe.

I can imagine it’s a daunting task, that.

There’s a newer version of the docs at
http://www.fifthplanet.net/foxdoc/index.html

I believe the website maintainers will be moving it to fox-toolkit.org
when it is finished.

···

On Wed, 15 Jan 2003 00:27:25 +0900 Joey Gibson joey@joeygibson.com wrote:

On Tue, 14 Jan 2003 23:44:24 +0900, Robert McGovern > robertm@spellmanhv.co.uk wrote:

Joey


http://www.joeygibson.com


“Daniel P. Zepeda” <daniel@z,e,p,e,d,a,-,z,o,n,e.net>
(Remove commas for address)

It’s funny how aquaintences pop up in different places… :sunglasses:

Mmm, it does appear to be a rather small world :slight_smile:

Its good to see you here.

That’s what I figured. I did get a minimal UI built yesterday during lunch
that is almost there, but it was all from example-reading and stuff at
fox-toolkit.org.

Yeah, it really is the way to go at the moment :frowning: Though the docs
pointed out by Daniel look to be quite useful.

Then I discovered FXDataTargets (very similar to
Smalltalk’s adaptors) and started rewriting it…

Interesting, what are you rewritting it to do?

I can imagine it’s a daunting task, that.

Yup, I don’t envy him at all.

Rob

I just meant that I had written it to fetch each text widget’s text
directly and pass it to my object. But then I discovered FXDataTarget that
would allow me to wire the widget directly to the attributes of my
underlying class and have the values populate automatically. So I ripped
out my original code and started working with datatargets.

Joey

···

On Wed, 15 Jan 2003 01:13:00 +0900, Robert McGovern robertm@spellmanhv.co.uk wrote:

Then I discovered FXDataTargets (very similar to
Smalltalk’s adaptors) and started rewriting it…

Interesting, what are you rewritting it to do?