I am new to linux and I want to add lib64/librt.so.1 to linker commnad line. Can anyone suggest how can i do this?
Thanks in advance
If you are compiling something and you want the compiler to search a specific directory, you can add the -L flag. Like this:
g++ -L /lib64
You can also add this directory to the environment variable 'LD_LIBRARY_PATH'. Like this:
You can also use ldconfig to add a directory to the search path. Like this:
sudo ldconfig /lib64
Finally, you can add the directory to /etc/ld.so.conf (and rerun 'sudo ldconfig') to make this change permanent.
sudo echo "/lib64" >> /etc/ld.so.conf; sudo ldconfig
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
1 year ago