[Rubyinstaller-devel] Mac OS installer

Mark Hubbart discordantus at gmail.com
Fri Oct 21 12:59:30 EDT 2005

On 10/21/05, Patrick May <patrick at hexane.org> wrote:
> Mark,
> For some reason, I think ruby.h used to be in the archdir:
> [glider:~/programming/ruby-web] patsplat% rake compile
> (in /Users/patsplat/programming/ruby-web)
> gcc -F.     -L"/Library/Frameworks/Ruby.framework/Versions/1.8.2/
> Libraries" -I/Library/Frameworks/Ruby.framework/Versions/1.8.2/
> Libraries/Bundles sapi/ruby-web.c -framework Ruby  -lruby -lobjc  -o
> bin/ruby-web
> sapi/ruby-web.c:1:18: error: ruby.h: No such file or directory
> sapi/ruby-web.c: In function 'main':
> sapi/ruby-web.c:13: error: 'ruby_errinfo' undeclared (first use in
> this function)
> sapi/ruby-web.c:13: error: (Each undeclared identifier is reported
> only once
> sapi/ruby-web.c:13: error: for each function it appears in.)
> [glider:~/programming/ruby-web] patsplat%

I'm copying this to the list, since this is an important issue I need
to address. When changing from a traditional dylib to an OSX
framework, it requires some minor changes for software that will be
compiled against it. The quick way to solve the problem is to add args

to CPPFLAGS, add: -I/Library/Frameworks/Ruby.framework/Headers
to LDFLAGS, add: -framework Ruby

The -framework flag is like the -l flag, but for frameworks. The -I
just adds the proper headers dir. These changes let you use the ruby
framework in the exact same way as a shared library.


> Cheers,
> Patrick

More information about the Rubyinstaller-devel mailing list