The importance of the Windows environment variable path order

Source: Internet
Author: User

  Path is the meaning of paths, and the value stored in the PATH environment variable is a series of paths. Between the different paths, separated by semicolons in English. When the system executes the user command, if the user does not give an absolute path, it will first look for the corresponding executable file, batch file, etc. in the current directory. If not found, then in the path saved in these paths to find the corresponding executable program files (Windows environment variable lookup order is based on the file in the order of entry in the previous search, the first one of the highest priority, if you find the command will not look back).

What happened to me makes me feel the importance of the path sequence: prior to image processing, the use of opencv2.4.10, because the use of vs2013 to compile, so in path is filled in OpenCV vc12/bin Later, because of the use of an older industrial camera, it provides a library to support the latest only to vs2010, so I downloaded the vs2010, but still use vs2013 to compile (you can choose the platform toolset in vs2013 vs2010, and no longer vs2010 in the rebuilding project), In vs2013, the OpenCV Library link to the Lib file is changed to Vc10/lib, and the Vc/bin directory is added to the end of the PATH environment variable. Results after compiling no problem, run the generated exe is strange, the general meaning is that you use the XXX in the heap did not release the kind of (English is not good ah ...) It was strange that these errors would not have occurred before using the vs2013 version. The blind toss for a long time, finally in path in the Vc12/bin Delete, only successfully run.

Then I was thinking, is not the system in the execution of OPENCV related commands, after vc12/bin found the corresponding command (vc12/bin and Vc10/bin command should be the same name), do not continue to look down. So, I add vc12/bin back, put in the back of the Vc10/bin, compiled after the run, also succeeded, this confirms my idea of the right.

Make a note here and give yourself a wake up call

The importance of the Windows environment variable path order

Related Article

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.