Tech Support > Microsoft Windows > Drivers > error RC1015: cannot open include file 'afxres.h'
error RC1015: cannot open include file 'afxres.h'
Posted by hsphuah@usa.com on June 29th, 2006


Hi all,

When I compile my code on Vista WDK (5384), the compiler complains it
cannot open include file "afxres.h". It does not happen to earlier
Vista WDK (5270) or DDK.

Fyi, I can find the file in C:\WINDDK\5384\inc\mfc42 but I cannot
understand why the compiler complains the opening the file.

Does anyone encounter this problem before? If so, how do you solve it?

Thanks.

Sincerely
HS Phuah

Posted by Eliyas Yakub [MSFT] on June 30th, 2006


Generate a preprocess file and see who is trying to include the header
what's the path being used.

For example, if the file is xyz.c then you can do the following in the build
environment to generate a .pp file.

build -z -nmake xyz.pp


Let us know what you find.

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/tips/default.mspx


Posted by natkhatbandar@yahoo.com on July 7th, 2006



Eliyas Yakub [MSFT] wrote:

Hi,
I am facing exactly the same problem.
The afxres.h is being included from an RC file. I guess the preprocess
file approach that you suggestd will not work here.

I tried with different DKs:
5373, 5382 and 5462: Same compilation error.
5348 and 3790.1830. Did not get this error.

Any pointers would be helpful. Thanks


Posted by Eliyas Yakub [MSFT] on July 10th, 2006


Can you include winres.h instead of afxres.h and see if it works?

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/tips/default.mspx