p.s.

You probably also should use the -I option, to tell gcc to take the ruby 
includes from /opt/local/include/ruby-2.1.0/ as well, otherwise it will pick up 
the system ones, and thus there will be a miss match.

On 26 Apr 2014, at 3:16pm, Christopher Jones <jon...@hep.phy.cam.ac.uk> wrote:

> Hi,
> 
> You need to use the -L option to tell the linker to look in your MacPorts 
> installation. 
> 
> Also, if you want a particular ruby version, it would be better I think to 
> explicitly link against that, rather than relying on what ‘libruby’ point to
> 
> so (if your installation is in the default prefix) use
> 
> -L/opt/local/lib -lruby.2.1
> 
> Chris
> 
> On 26 Apr 2014, at 2:55pm, Kevin Walzer <k...@codebykevin.com> wrote:
> 
>> On Mavericks, I am developing a tool that uses an embedded Ruby interpreter 
>> and am trying to link it against my MacPorts installation of Ruby 2.1. 
>> However, while it successfully builds and runs with the following command:
>> 
>> gcc -Wall -v -o test test.c -lruby
>> 
>> it is linked against the system Ruby, 2.0. (Apple has apparently replaced 
>> MacRuby with standard Ruby in Mavericks.)
>> 
>> Can anyone suggest the correct command-line invocation to point my tool at 
>> MacPorts Ruby instead?
>> 
>> --Kevin
>> -- 
>> Kevin Walzer
>> Code by Kevin/Mobile Code by Kevin
>> http://www.codebykevin.com
>> http://www.wtmobilesoftware.com
>> _______________________________________________
>> macports-users mailing list
>> macports-users@lists.macosforge.org
>> https://lists.macosforge.org/mailman/listinfo/macports-users
> 
> _______________________________________________
> macports-users mailing list
> macports-users@lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-users

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to