Click here to Skip to main content
Click here to Skip to main content

Tagged as

*.pch file missing!

, 15 Feb 2010
Rate this:
Please Sign up or sign in to vote.
Sometimes, Visual c++ users see a pretty confusing error message when they compile or build their projects. the error message says :fatal error C1083: Cannot open precompiled header file: 'filename.pch': No such file or directorymy solution was :In VS, go to Project->Options, set the...
Sometimes, Visual c++ users see a pretty confusing error message when they compile or build their projects. the error message says :
 
fatal error C1083: Cannot open precompiled header file: 'filename.pch': No such file or directory
 
my solution was :
 
In VS, go to Project->Options, set the Configuration Combobox in top to 'All Configurations', and then from left pan, choose 'C/C++->Precompiled Haeders' and set 'Create/Use Precompiled headers' option to value : 'Create Precompiled headers (/Yc)'.
 
which turned out not to be an accurate solution (Read the Messages below).
 
well, here is the solution :
 

1) Right click on the PROJECT (in Solution Explorer) | Properties | C/C++ | Pre-compiled Headers... here you set to ** /Yu **
2) Right click on STDAFX.CPP (in Solution Explorer) | Properties | C/C++ | Pre-compiled Headers... here you set to ** /Yc **
 
its done.
 
all credits for this tip goes to :SledgeHammer01

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

The Zetta

Iran (Islamic Republic Of) Iran (Islamic Republic Of)
No Biography provided

Comments and Discussions

 
GeneralMy vote of 1 PinmemberSledgeHammer0114-Feb-10 8:06 
GeneralRe: My vote of 1 [modified] PinmemberThe Zetta14-Feb-10 9:39 
GeneralRe: My vote of 1 PinmemberSledgeHammer0114-Feb-10 10:57 
GeneralRe: My vote of 1 PinmemberThe Zetta14-Feb-10 21:24 
GeneralRe: My vote of 1 PinmemberSledgeHammer0115-Feb-10 7:13 
GeneralRe: My vote of 1 PinmemberThe Zetta15-Feb-10 8:34 
GeneralRe: My vote of 1 PinmemberSledgeHammer0115-Feb-10 8:40 
GeneralRe: My vote of 1 PinmemberThe Zetta15-Feb-10 21:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 16 Feb 2010
Article Copyright 2010 by The Zetta
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid