Open CedricCicada opened 3 years ago
To me, using precompiled headers is a mess. I omit them where I can as they lead to many errors, faults, mistakes and - it's OLD technology from Microsoft, which has helped in recent times to decrease compile times.
Eliminate it completly, if possible ... just a tip.
I agree completely. I never use them. But there may still be places where afxwin.h gets included that I don't know about. Either the documentation or the program still needs to be fixed. On Wednesday, February 3, 2021, 06:28:33 PM EST, RoyalPictou notifications@github.com wrote:
To me, using precompiled headers is a mess. I omit them where I can as they lead to many errors, faults, mistakes and - it's OLD technology from Microsoft, which has helped in recent times to increase compile times.
Eliminate it completly, if possible ... just a tip.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I have positive experiences from using precompiled headers. Reduces compile times a lot. A long time ago they could be problematic. These days a correctly defined precompiled header rarely introduce any problem.
Note that afxwin.h has nothing to do with precompiled headers. Likewise, stdafx.h has nothing to do with AFX (MFC). It's just the default name used by wizards in old versions of Visual Studio. Recent versions use the name pch.h instead.
There should be no conflict between precompiled headers and VLD in the same project. Just make sure the precompiled header does not include afxwin.h.
The vld.h file contains this:
`#ifdef __AFXWIN_H__
error[VLD COMPILE ERROR] '#include' should appear before '#include ' in file stdafx.h
endif
`
But the documentation says this:
"In at least one C/C++ source file from your program, include the vld.h header file. It should not matter which file you add the include statement to. It also should not matter in what order the header is included in relation to other headers. The only exception is stdafx.h (or any other precompiled header). A precompiled header, such as stdafx.h, must always be the first header included in a source file, so vld.h must be included after any precompiled headers."
Please fix one or the other.