The relationship between LD_LIBRARY_PATH and-L, ld_library_path-l

Source: Internet
Author: User

The relationship between LD_LIBRARY_PATH and-L, ld_library_path-l

LD_LIBRARY_PATH is an environment variable, which is used to let the dynamic link library loader (ld. so) there is an additional option at runtime (run-time) to add a search path list. In this environment variable, multiple paths can be stored and separated by colons. It is amazing that the order in which the paths listed in LD_LIBRARY_PATH are searched is prior to the runtime search path embedded in the binary file or the default system load path (such as/usr/lib ).

 

A side effect that is not quite attractive is that LD_LIBRARY_PATH will also be searched in the Link stage, after the directory specified by-L (of course, it will also be searched without the-L option ).

 

Bytes ----------------------------------------------------------------------------------------------------------------

My problems:

G ++ multiple. cpp-L/usr/local/lib-lboost_program_options after compilation, ldd./a. out found

Libboost_program_options.so.1.55.0 => not found

However, when I write in. bashrc:

Export LD_LIBRARY_PATH =/usr/local/lib, and then compile it. I found it is okay. Why?


How to use export LD_LIBRARY_PATH =/myfile/makefile: $ LD_LIBRARY_PATH in makefile

LD_LIBRARY_PATH is the environment variable used by the system to query the library file when the program is running. You are compiling and generating the target file... you do not need to process this variable...

You only need to use-L to specify the location of the special library file and-l to specify the library name when gcc compilation generates the final target...

Relationship between mol/L and N

Mol/L is the volume concentration of the substance per litre, that is, the number of moles contained in the substance per litre
The molar and equivalent concentrations can be converted under specific substances.
For example, the equivalent concentration of 1mol/L of sulfuric acid should be 2N sulfuric acid, which means that 1mol of sulfuric acid will have 2mol of hydrogen ions, and 1mol/L of hydrochloric acid is 1N.
1 mol/L of NAOH is 1N, 1 mol/L of CA (OH) 2 is 2N alkali.
That is to say, if the number of hydrogen ions or hydrogen ions is one, then they are 1:1 conversion. If the number of hydrogen ions or hydrogen ions is n, the equivalent is n and the molar number is one.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.