Bugs: Browse | Submit New | Admin

[#3564] Doesn't seem to work on Windows XP

Date:
2006-02-14 20:18
Priority:
3
Submitted By:
Nobody
Assigned To:
Rob Leslie (verement)
Category:
None
State:
Open
Summary:
Doesn't seem to work on Windows XP

Detailed description
The DL.dlopen looks for libgd.so.2 (if not OSX) on line 29 of gd2.rb. libgd.so.2 doesn't exist on a Windows machine
(after installing the gem, of course).

Workaround?

Add A Comment: Notepad

Please login


Followup

Message
Date: 2011-01-11 14:00
Sender: Zeno R.R. Davatz

this will do the trick for mingw: http://url.ba/whg9 - thanks
to Luis Lavena RubyInstaller Master for Windows!
Date: 2006-05-13 01:25
Sender: Rob Leslie

No promises, but I made some changes in 1.1.1 that I hope will
allow Ruby/GD2 to work under Windows with bgd.dll.
Date: 2006-03-29 18:01
Sender: Richard Aspden

Quick bit of hacking later on gd2.rb, and I switched the
following:

Line 29:
LIB = DL.dlopen(Config::CONFIG['arch'].include?('powerpc-darwin')
?
    'libgd.2.dylib' : 'libgd.so.2')

to:
  LIB = DL.dlopen(case
    when Config::CONFIG['arch'].include?('powerpc-darwin'):
'libgd.2.dylib'
    when Config::CONFIG['arch'].include?('mswin32'): 'bgd.dll'
    else 'libgd.so.2'
    end)

I know it's probably not the cleanest code in the world, but
it'll do. However, I've now got a new error, about fonts. I'm
assuming this is FreeType related. Removing the font references
removed the errors, but I need font support, so I did a little
more investigation.

The error, for the record, is as follows in the IRB:
irb(main):001:0> require 'gd2'
RuntimeError: unknown symbol "gdFontCacheShutdownA"
        from C:/ruby/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2.rb:122:in
`[]'
        from C:/ruby/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2.rb:12
2
        from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi
re.rb:21:in `inject'
        from C:/ruby/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2.rb:12
2
        from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi
re.rb:21:in `require'
        from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:182:in
`activate'
        from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:181:in
`activate'
        from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi
re.rb:26:in `require'
        from (irb):1

More to follow. I'm hoping it doesn't require mass recompilation,
but I have a feeling it might.
Date: 2006-02-14 20:24
Sender: Nobody

Maybe the compiled DLL for Windows could be used? Find it at
the GD home page or directly at
http://www.boutell.com/gd/http/gdwin32.zip

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
assigned_tonone2006-05-13 01:25verement