> Are you using the 'configure.bat' script in the 'win32' directory? Have
you read 'readme.win32'?

I didn't intend to build ruby in msvc quite yet.  I am planning to build
everything in msvc later, but for now I just wanted to start making some of
my first changes, which happen to be in ruby-fltk, and I am using msvc
because everything will be using that later and I need to start somewhere.

I just included the ruby mswin32 dll in my msvc build instead of building
ruby.  Do you think this may be a mistake?  Should a cygwin build of Ruby be
expected to open a dll?  I got the impression that Ruby would open any
library type from any build.

> If you can be more specific about what is going wrong perhaps I can help

My ruby.h problems were fixed by looking at config.h and setting compile
flags.  Little things were wrong like msvc defaulting to WIN32 when config.h
expected _WIN32.

I have managed to compile both fltk and ruby-fltk with msvc.  If you are
curious what problems I had, see below.

I am now stuck at the require statement.  I put rubyfltk.dll in
C:\cygwin\usr\local\lib\ruby\1.6\i386-cygwin and removed the rubyfltk.so
file.  Now when I hit the require statement, I get this error:

	/usr/local/lib/ruby/1.6/Fltk.rb:1:in `require': dlopen: Win32 error 126 -
/usr/local/lib/ruby/1.6/i386-cygwin/rubyfltk.dll (LoadError)

Since I am a newbie, there is no doubt I could have done a zillion different
things wrong.  Can you give me a clue of where to start looking?


FYI: The problems I (a newbie) encountered when building ruby-fltk
------------------------------------------------------------------
Problem 1: .cc files aren't recognized

	See http://support.microsoft.com/support/kb/articles/Q181/5/06.ASP

Problem 2: error: not all control paths return a value

	Added "return 0;" to end of many many routines


Problem 3: redefinition of default parameter

	According to Microsoft, the prototype and the actual function cannot both
have default params (huh?).  I conditionally changed it to not define the
default parameter (it was never used).  If anyone understands what Microsoft
intended for this situation, please tell me.

	fltk.cc(113) : error C2572: 'iary2cary' : redefinition of default parameter
: parameter 2
	fltk.cc(144) : error C2572: 'cary2iary' : redefinition of default parameter
: parameter 2
	fltk.cc(170) : error C2572: 'fary2cary' : redefinition of default parameter
: parameter 2


Problem 4: rb_gc_mark parameter mismatch

	I have no clue what this is.  Maybe ruby-fltk 0.3 is not compatible with
ruby 1.6.5? I conditionally changed the source to not include the parameter
in the call.

	flwidget.cc(34) : error C2660: 'rb_gc_mark' : function does not take 1
parameters

Problem 5 : MSVCRT redefines

	I added /MD to compile (I can't remember where I found how to do this).

-----Original Message-----
From: Lorien Dunn [mailto:loriend / bigpond.com]
Sent: Friday, November 23, 2001 3:53 PM
To: ruby-talk ML
Subject: [ruby-talk:26269] Re: bitmap in ruby-fltk?


On Fri, 23 Nov 2001 19:57, Mark Hahn wrote:

> But only in 256 colors, not rgb.  It is rgb painting that I am totally
> stuck on.  I was coding a slow xbm display routine in pure ruby (pretty
> easy) until I dicovered this limitation.  I could do slow xpm with 256
> colors easily, but now I'm working on adding fltk classes to ruby-fltk
> instead.
>

> Right now I am stuck getting ruby.h to work in VisualC (I know that is a
> stupid thing to be stuck on, but I'm not a VisualC expert).  I was able to
> compile fltk itself in VisualC.
>

  If you link Fltk 1.1.0b5 you will get 32-bit colour support, an improved
file selector, an html viewer (I've added the HelpDialog form to ruby-fltk),
and numerous other improvements. But currently I have to pass
--disable-opengl to extconf.rb to make it work (on Linux).

 I had no problems compiling ruby with MSVC 5 sp 3. If you can be more
specific about what is going wrong perhaps I can help. You shouldn't have to
modify ruby.h at all. Are you using the 'configure.bat' script in the
'win32'
directory? Have you read 'readme.win32'?

Lorien Dunn