|
From: Adam L. <ag...@im...> - 2007-04-16 05:40:08
|
http://factor-language.blogspot.com/2007/04/embedding-factor-into-c-applications.html "on Linux, there is no way to build an executable which looks for a required shared library in the same directory as the executable itself." Not a problem here: % cat > libtest.c << EOF void test() { } EOF % cat > tester.c << EOF extern void test(); int main() { test(); } EOF % gcc -o libtest.so -shared libtest.c % gcc tester.c libtest.so % grep a.out <(nm ./a.out) # (my pipe key is broken) U test % ldd ./a.out linux-gate.so.1 => (0xffffe000) libtest.so (0xb7fce000) libc.so.6 => /lib/libc.so.6 (0xb7e9f000) /lib/ld-linux.so.2 (0xb7fd1000) % ./a.out % rm libtest.so % ./a.out ./a.out: error while loading shared libraries: libtest.so: cannot open shared object file: No such file or directory -- Adam Langley ag...@im... http://www.imperialviolet.org 650-283-9641 |