From: Brian Candler Date: 2003-07-23T21:52:11+09:00 Subject: Re: Embedding problem - SEGV On Wed, Jul 23, 2003 at 09:04:50PM +0900, ts wrote: > >>>>> "B" == Brian Candler writes: > > B> Spoke too soon - requiring a .so also causes it to segfault. > > How do you link your .out ? > > For example on linux, you need '-ldl -lcrypt -lm' I gave the compile/link command in the previous post, and adding -ldl makes it fail: $ gcc -Wall -g -o embed embed.c -lruby -lcrypt -lm -ldl -I /usr/local/lib/ruby/1.6/i386-freebsd4.7 -L /usr/local/lib/ruby/1.6/i386-freebsd4.7 /usr/libexec/elf/ld: cannot find -ldl $ In FreeBSD, dlopen() and friends are in libc. Regards, Brian.