gcc - how to make use of old system libraries -


we have project , shared libraries libprivate.so (private so) using old libraries libcurl.so.3. system upgraded new system libraries libcurl.so.4.

for internal issues, right not want make use of latest libraries libcurl.so.4, want make use of libcurl.so.3.

hence copied libcurl.so.3 in local folder , set ld_library_path according. when link entire project says there version conflict between libcurl.so.4 , libcurl.so.3 required libprivate.so (libprivate.so compiled long time ago libcurl.3.so).

should not worry warning , proceed further?

when correctly specify ld_library_path has libcurl.so.3, why taking system directory /usr/lib64/libcurl.so.4? when ldd my_binary, takes libcurl.so.4. how stop it? specifying -l specific location doesn't work. modiying /etc/ld.conf entire system. want make when ran project.

specifying explicit path works /home/mydir/libcurl.so.3, not want it.

i want have these conditions when execute project. in other cases can make use of latest libraries.

thanks help

if command show in comment correct:

gcc test.c -l~/lib/x86_64/ -lcurl -o test 

... need space between -l , ~/lib/x86_64/ or shell won't expand ~, linker not looking in right directory.

so need either:

gcc test.c -l ~/lib/x86_64/ -lcurl -o test 

or:

gcc test.c -l$home/lib/x86_64/ -lcurl -o test 

(you don't need space here because variables expanded anywhere in word, ~ expanded @ start of word.)


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -