guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question: link to wrong library


From: Nala Ginrut
Subject: Re: Question: link to wrong library
Date: Mon, 22 Jan 2018 09:07:52 +0800

I think you may need LD_LIBRARY_PATH

2018年1月21日 23:46,"陶青云" <address@hidden>写道:
Hi. I'm new to guile.  I compiled it from source without `make install`. 

I write a simple C file and use the flowing command to compile it.
    `gcc -pthread -I. -L ./libguile/.libs -lguile-2.2  -lgc test.c`
it successed. but the a.out is always link to my system guile library.
   $ ldd ./a.out 
linux-vdso.so.1 (0x00007fffc259b000)
libguile-2.2.so.1 => /usr/lib/libguile-2.2.so.1 (0x00007fa90f9fe000)
libgc.so.1 => /usr/lib/libgc.so.1 (0x00007fa90f794000)


even I do the flowing:
$ cp libguile/.libs/libguile-2.2.so.1.3.0  libguile/.libs/libguile-2.5.so

$ gcc -pthread -I. -L ./libguile/.libs -lguile-2.5  -lgc test.c  # it successed

$ ldd ./a.out 
linux-vdso.so.1 (0x00007ffd283e0000)
libguile-2.2.so.1 => /usr/lib/libguile-2.2.so.1 (0x00007f83c71cc000)
libgc.so.1 => /usr/lib/libgc.so.1 (0x00007f83c6f62000)


Could someone give me some tips.  Thanks.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]