complier looking for stdafx.h

My code is way to large too post. There are 20 files in my project. I have  #include <stdafx.h>
On the  first line of the main cpp file but compiler seems to be looking for it in the other
Files too I dont understand why. I have every file in solution. One should be enough.
1>------ Build started: Project: MastrerDLinkListTest, Configuration: Debug Win32 ------
1>Compiling...
1>DLinkList.cpp
1>c:\testinclude\dlinklist.cpp(286) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1>DLNode.CPP
1>c:\testinclude\dlnode.cpp(66) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1>DSLinkList.cpp
1>c:\testinclude\dslinklist.cpp(180) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1>TestDSLink.cpp
1>c:\testinclude\testdslink.cpp(421) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1>Generating Code...
1>Build log was saved at "file://c:\Users\store30\Documents\Visual Studio 2005\Projects\MastrerDLinkListTest\MastrerDLinkListTest\Debug\BuildLog.htm"
1>MastrerDLinkListTest - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


bdavid35Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Infinity08Commented:
Note that <stdafx.h> is not the same as "stdafx.h"

Use this :

        #include "stdafx.h"
0
jkrCommented:
You need to either add the include directive to the beginning of each file or set the "Precompiled Header" feature in your project settings to use a different header file for these. Since adding that is way easier, I'd say: Just do it.
0
jkrCommented:
>>Note that <stdafx.h> is not the same as "stdafx.h"

That does not make any difference here - just in one file is simply not enough.

More info and docs at http://msdn2.microsoft.com/en-us/library/3dxawkbx(vs.80).aspx ("Using Precompiled Headers in a Project")
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Infinity08Commented:
>> just in one file is simply not enough.

Ah, missed that bit in the question ;)
0
bdavid35Author Commented:



 
 I set the "precompiled header" in my project and nothing changed . so  I made sure all my files had
#include "stdafx.h" but now the compiler says i that It cant find "stdafx.h" while it seems like it accept
earilier occurances of it. what shall i do???????
Thanks
bdavid35
0
jkrCommented:
Well, create an empty "stdafx.h" file (yes, I *do* know this sounds stupid) in yout solution/project's directory, that should help.
0
bdavid35Author Commented:

i started note  pad and saved an empty file named  " stdafx.h" in the solution/project's directory but I got the same results.
bdavid35
0
jkrCommented:
Did you place it there where the .vcproj file lives? Or even better, the directory where your .cpp files reside...
0
bdavid35Author Commented:
thank you very much for your help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.