On 27 Apr 2014, at 4:05am, Kevin Walzer <k...@codebykevin.com> wrote:
> 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/ Glad it filly worked. However, as Ryan kindly pointed out, much better to use pkg-config than to hardcode the above paths. i.e. use > gcc -Wall -v -o run run.c `pkg-config ruby-2.1 --cflags —libs` where `pkg-config ruby-2.1 --cflags —libs` expands dynamically to > pkg-config ruby-2.1 --cflags —libs -I/opt/local/include/ruby-2.1.0/x86_64-darwin13 -I/opt/local/include/ruby-2.1.0 -L/opt/local/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -lruby.2.1.0 -lpthread -ldl -lobjc Chris > Thanks. > > -- > 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
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users