Shared Library Error in linux [SOLVED]
usr/bin/ld: cannot find <nameOfThe Library>???
Hi guys, Do some of you face the same problem with me when try to compile program with shared library on linux?, The error will be ''usr/bin/ld: cannot find <nameOfThe Library>". I have browsed and walla...there are many ways to do but you know that not all of them can solve it. There is a way that works for me by doing command "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<location_of_your_library>" before I compile the program. But I must do it everytime I wanna compile the program so I think it's less efficient.
Then, I tried to do this guys "copying my library to /usr/lib" using this following command "sudo cp <name_of_library> /usr/lib". And I tried to compile my program again. Guess what??, It totally works. You don't have to execute export LD_LIBRARY_PATH again. Hopefully, it helps you which have the same problem with me. Thanks and keep sharing. (I almost forgot to inform that shared library which I wanna to deal with is dynamic library (name_of_library.so)).

Komentar
Posting Komentar