Click here to Skip to main content
15,889,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting a link error "LINK : fatal error LNK1104: cannot open file '.\Debug\stdafx.obj'" while compiling my MFC application . I have set the Project Properties->Configuration Properties-> C/C++-> Preprocessor->Generate Preprocessed File to no.Can anyone please help me to solve this issue ?
Posted

I think you probably need to set "Precompiled Header" to "Not Using Precompiled Headers", in your compile options. You should then do a complete rebuild.
 
Share this answer
 
A rebuild is mostly what is needed. This error is not necessarily related to using precompiled headers or not, even though the error indicates the file is stdafx.obj.
 
Share this answer
 
There are a number of reasons that can give LNK1104 error. See MSDN documentation for a list and make sure you don't have any one of those cases.

http://msdn.microsoft.com/en-us/library/ts7eyw4s(VS.71).aspx[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900