Dependencies (C++)

Started by
0 comments, last by Crypter 17 years ago
I'm using Microsoft Visual C++ 6.0. I don't know if this is relevant to the question but just in case... From what I've understood there are two types of dependencies: The 'external Dedependencies' which are files the compiler will automatically add to my project by checking what I might include during preprocessing. And Project Dedependencies, which I have no clue about. The only thing I found out is that each project in the workspace can add each other project to it's 'Project Dependency List'. Please fix anything I've misunderstood till now. And 2 questions: 1) So what are Project Dedependencies? 2) What do the External Dedependencies help in? Besides showing them in the project's file list, they aren't compiled anyway till I request any compilation from the Program. Thanks in advance!
Advertisement
Quote:
So what are Project Dedependencies?

When one project relies on another.

Each project file produces a static library (*.lib)
These libraries could be linked by a project (As an
additional dependency), and used by the project (Project A)

Lets say a static library is produced from Project B, and
is linked with Project A. (Project A depends on Project B)

What would happen if the library file (produced from Project B) tries
to execute a function from Project A? This would not be possible, because
Project A uses project B (The library). Project B does not no anything
about Project A.

Because this is not possible, Visual studio puts some restrictions
on project dependencies.

Quote:
What do the External Dedependencies help in?

They provide a list of additional library files (*.lib) for the linker
to link with your project. Any files the compilier automatically links
are linked based on your projects configuartion settings.

That is, Win32 programs rely on the Win32 API. The Win32 SDK library files
need to be linked with the program in order for Win32 function calls
to exist (The library files contain the actual Win32 SDK code)

You can easily take these dependencies out (or add your own)

Hope this helps!

This topic is closed to new replies.

Advertisement