A
Arpi Jakab
I have a main project that depends on projects A and B. The main project's
additional include directories list is:
...\ProjectA\Dist\Include
...\ProjectB\Dist\Include
Each of the include directories contain a file named "cppfile1.h".
In my main project I #include "cppfile1.h". I rely on the order of paths in
additional include directories list to get file cppfile1.h from ProjectA and
not from ProjectB. Although this is not the case. The cppfile1.h from
ProjectB is compiled into the main project. I do not use precompiled headers
in the main project.
The source of the problem seem to be that the main project has a #include
for a file called "cppfile2.h" that is only located in ProjectB. Since this
file is #included into the main project before cppfile1.h, VS .NET seems to
grab all files from the ProjectB directory including the wrong version of
cppfile1.h. The ProjectB version of the cppfile1.h is used for all future
#includes, despite the order of directories in the "Additional Include
Directories" list.
I do not control code for projects A and B and hence cannot rename
cppfile1.h. Any help would be greatly appreciated.
- Arpi
additional include directories list is:
...\ProjectA\Dist\Include
...\ProjectB\Dist\Include
Each of the include directories contain a file named "cppfile1.h".
In my main project I #include "cppfile1.h". I rely on the order of paths in
additional include directories list to get file cppfile1.h from ProjectA and
not from ProjectB. Although this is not the case. The cppfile1.h from
ProjectB is compiled into the main project. I do not use precompiled headers
in the main project.
The source of the problem seem to be that the main project has a #include
for a file called "cppfile2.h" that is only located in ProjectB. Since this
file is #included into the main project before cppfile1.h, VS .NET seems to
grab all files from the ProjectB directory including the wrong version of
cppfile1.h. The ProjectB version of the cppfile1.h is used for all future
#includes, despite the order of directories in the "Additional Include
Directories" list.
I do not control code for projects A and B and hence cannot rename
cppfile1.h. Any help would be greatly appreciated.
- Arpi