The link order of Lib in Visual studio

Source: Internet
Author: User

Description: If there is an EXE project, it relies on a.lib,b.lib,a.lib and B.DLL I also have their source works. The dependency order is such a exe->a.lib->b.dll. Then if I change the source code of B, compile the EXE project, the compiler and the connector must know, first compile B, then the B link to a, and finally regenerate exe. The order can be specified as follows:

1. Can be specified by #pragma (lib,a.lib,b.lib).

2. Command-line Options/out can be reflected. such as/out:xx.exe A.lib B.dll.

The summary is that the more inclined to the underlying components and libraries are placed behind. This is the same as GCC and g++ connectors. Otherwise it will go wrong.

References

Http://stackoverflow.com/questions/2765403/visual-studio-2010-library-linking-order

The link order of Lib in Visual studio

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.