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).
Some of the header files you include in your project such as Windows.h or the various SFML.hpp files can become rather large but rarely ever change. To speed up the compilation process, you put all of these header files in stdafx.h and then include stdafx.h as the very first item in every cpp file.
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!
Include Stdafx
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?
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 Not Found
Someone told me once, 'Just wait until you get linker errors!' I see what he was talking about, now...
Include Stdafx In Header File
May 04, 2014 When you have precompiled headers selected, the pch file 'stdafx.h' should be located in the project directory. When the compiler sees the special line. #include 'stdafx.h' it does not use the usual lookup rules, but rather looks in the project directory for the pch file. Feb 22, 2012 When you build this project, if you do not have a precompiled header the compiler is going to compile the 2 source files main.cpp and support.cpp. When it does, it will do this: Compiling main.cpp - found #include 'stdafx.h' in main.cpp, so start compiling stdafx.h. Azure DevOps. Azure DevOps Server (TFS) 0. Stdafx.h and pch.h. Visual studio 2019 version 16.2 windows 10.0. Jaden Yip reported Aug 28, 2019 at 07:43 PM. Show comments 6. Add comment 10 40000 characters. Sep 13, 2016 Contribute to Azure/azure-storage-cpp development by creating an account on GitHub. Microsoft Azure Storage Client Library for C. Contribute to Azure/azure-storage-cpp development by creating an account on GitHub. Skip to content. // stdafx.h: include file for.