[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

ruby.h error on OS X

Jeff Schwab

3/2/2009 5:24:00 PM

Has anyone else had problems with the ruby 1.9.1 development headers on
OS X?

$ echo '#include "ruby.h"' >main.c
$ gcc -c main.c
In file included from /Users/jeff/usr/include/ruby/ruby.h:1125,
from /Users/jeff/usr/include/ruby.h:32,
from main.c:1:
/Users/jeff/usr/include/ruby/missing.h:35: error: redefinition of
?struct timespec?
$
1 Answer

Nobuyoshi Nakada

3/2/2009 7:45:00 PM

0

Hi,

At Tue, 3 Mar 2009 02:23:47 +0900,
Jeff Schwab wrote in [ruby-talk:330122]:
> $ echo '#include "ruby.h"' >main.c
> $ gcc -c main.c

You need to add -I option for platform specific headers, maybe
-I $HOME/usr/include/`uname -m`-darwin`uname -r`. mkmf.rb
should deal with it.

Apple has added a strange hack to gcc in their port so it reads
ruby/missing.h from
/System/Library/Frameworks/ruby.framework/Headers/config.h.

--
Nobu Nakada