当前位置: 首页 > 工具软件 > dew-framework > 使用案例 >

Framework and references vs project dependencies

慕容安易
2023-12-01

Function "framework and references" can reference assembly generated by another project in same or separate solution, or contained in another team project and third-part assembly.

 

Function "project dependencies" . makes it possible for you to determine which projects in the selected solution must be built first. Setting project dependencies stipulates the desired build order for projects. 


Project dependency isn't a property of the linker, but rather the build chain as a whole.  Say project A is a stand alone binary that compresses a file.  Project B executes this binary.  Project B wants to make sure it has the most up to date binary of Project A available, so the developer says B is dependent on A.  Say the developer is working on Project B fixing a bug in some file, and this file happens to be shared with Project A.  Now when the developer builds their Project B, they will also rebuild Project A, getting the updated (corrected) version of Project A.  In this manner, a dependency exists, but it is not a linker based dependency.


As described here (see "Solution Dependencies into Project to project reference section") , the intent was to take linker level dependency out of the solution and push it into the project.


So If project A need use project B, in project A, we need (1) #pragma comment(lib,"B.lib") or in project properties--->linker--->input--->additional dependencies--->add "B.lib" (2) properties--->Framework and references--->Add new reference---->select project B, then in project dependencies, B is checked for A, and the build order is also sorted automatically (B build before A). (3) If A need include some new header files, you need add new include directory in A properties--->C/C++--->Additional include directories if necessary.

 类似资料:

相关阅读

相关文章

相关问答