Link against MacPorts Ruby instead of system Ruby
Kevin Walzer
kw at codebykevin.com
Sat Apr 26 20:05:54 PDT 2014
On 4/26/14, 2:03 PM, Christopher Jones wrote:
> You should try looking around in the includes directory a bit ….
>
> ruby/config.h exists in
>
> /opt/local/include/ruby-2.1.0/x86_64-darwin13
>
> so it looks like you need to add
>
> -I/opt/local/include/ruby-2.1.0/x86_64-darwin13
>
> to your compilation command. No idea if this is normal ruby behaviour, as I said I am not a user or ruby.
This did the trick:
gcc -Wall -v -o run run.c -L/opt/local/lib -lruby.2.1
-I/opt/local/include/ruby-2.1.0/
-I/opt/local/include/ruby-2.1.0/universal-darwin13/
Thanks.
--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
More information about the macports-users
mailing list