Creating Dependencies Between C or C++ Projects
See Also
A C or C++ application or dynamic library often depends on static or dynamic libraries that
are linked with the object code by the linker. These libraries can be separate projects
that you designate as required projects of your C or C++ Application project.
Whenever you
clean and build the project, the IDE also cleans and builds the required projects.
Clicking a function hyperlink in a project with dependencies
causes the editor to jump to the function definition if the
definition is located in an open dependent project. If the dependent
project that contains the definition is
closed, the editor jumps to the function declaration.
The procedure for adding project dependencies is a little different for managed
projects created in the IDE, and unmanaged projects created
from existing sources.
To add a project dependency to an application or dynamic library managed project:
- In the Projects window, right-click the project and choose Properties.
- In the Project Properties dialog box, select the Linker node.
- In the Libraries panel, click the browse button.
- In the Libraries dialog box, click Add Project.
- In the Add Project dialog box, select the library project on which your
Application project depends, and then select a Configuration if the project
has multiple configurations.
- Click Add.
- If you do not want
the project to be built every time the dependent project is built, deselect
the Build checkbox to remove the check mark.
- Click OK in the Libraries dialog box and the Project Properties dialog box.
To add a project dependency to an umanaged project from existing sources:
- In the Projects window, right-click the project and choose Properties.
- In the Project Properties dialog box, select
Required Projects.
- In the Required Projects panel, click the browse button.
- In the Projects dialog box, click Add.
- In the Add Project dialog box, select the project on which your
project from existing sources depends, and then select a Configuration if the project
has multiple configurations.
- Click Add Project.
- If you want
the project to be built every time the dependent project is built, deselect
the Build checkbox to add a check mark.
- Click OK in the Projects dialog box and the Project Properties dialog box.
Legal Notices