Claudio Ferraro
Claudio Ferraro

Reputation: 4721

Visual C++ 2010. How to include header files which reside in another included project

I have 1 project. I imported in this project many external VC++ projects. I wanna to import in a .c file which resides in one of the included projects a .h (header file) which resides in another included VC++ project. How can achieve this?

Upvotes: 1

Views: 10157

Answers (2)

user1551023
user1551023

Reputation: 43

You should add a path to the other project. It's preferred to use the macros like $(SolutionDir) to refer to other projects in the solution.

Upvotes: 2

Michael Burr
Michael Burr

Reputation: 340516

In the properties for the project, add the location of the header files to the

C/C++ | General | Additional Include Directories

item.

To get the library project linked in, add a reference to it in the:

Common Properties | Framework and References

item.

I wish that adding the project reference would get the IDE to automatically add the refered-to project directory to the include file path, but it doesn't.

Upvotes: 7

Related Questions