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                                      [EMAIL PROTECTED]
http://www.imperialviolet.org                       650-283-9641

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to