Friday 13 July 2012

Visual Studio precompiled header issue solved

Visual C++ precompiled header issue solved

 

Today i found myself editing/removing and adding a few files for W32 .dll project im researching, only to run into this complie time error see below 

Error   1   fatal error C1083: Cannot open precompiled header file: 'Debug\xxxxx.pch': No such file or directory 


After an hour of googling and crawling through stackoverflow posts i solved the issue myself, seems like my .pch pre complied header file got corrupted while adding and removing .h files inside my stdafx.h.


 

Step: 1 Use the /Yc switch to recreate the .pch file.

 

Step: 2 Next use the /Yu switch to use the newly created .pch file

 

Done!

No comments: