Starting your project the Right Way is often 99% of the battle. File + New + Project, Visual C, Win32, select 'Win32 Console Application'. You now have an stdafx.h file with all the compiler settings just the way they should be to use the precompiled headers feature. May 15, 2009 stdafx.h is not 'available', it is project specific. It is an automatically generated file created when you use the Project Wizard creation in Microsoft VC (where presumably this code came from). It serves almost no purpose other to martial precompiled headers (a feature that Dev-C does not have and is of dubious benefit in any case).
Hi, friends!
So, I'm making the jump from console C++ to Windows programs, and actually having a lot of fun with that! But my method is, to use my Beginner's edition VC++ to compose the program, and when it's 'done', I switch to the free Bloodshed Dev C++ compiler (because the VC always puts that annoying dialog box you have to dismiss before the program will run, the one that says you can't release your program to the public, end-user-liscence blah,blah).
Usually, I manage OK with finishing a project in Dev that started in VC, but this time I have a dialog-based program that includes <stdafx.h>, which in turn includes five other afx*.h files, too.
Dev C++ throws a fit about this. Even after I copied every relevent header over to the Dev C++'s Include directory, it STILL complains that it can't find the headers!
Stdafx Download
Clue #1: This application used MFC wizard alot while it was a Microsoft project. Handy for adding all those bells and whistles, but does that doom it as far as Dev C++ is concerned?
Stdafx H Dev C 2017
Clue #2: I have noticed multiple repeat includes in different files of the project. Microsoft seemed happy with that, and I assumed everything was guarded by #ifndef statements. But do they only work for Visual C++?
Stdafx H Dev C Online
Someone told me once, 'Just wait until you get linker errors!' I see what he was talking about, now...