My project doesn't build when I turn pch off

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in Insure++
Sometimes a project that uses precompiled headers fails to compile or link under Insure++. For such projects, it is sometimes necessary to turn pch off when instrumenting your code with Insure++.

However, some projects will only build if PCH is turned on. Such projects are broken. They are usually just poorly configured and should be fixed. Usually the breakage is missing or inconsistent use of /I command line switches at compile time. In such cases, either no stdafx.h is found, or the wrong one is on the INCLUDE path, and the compilation of some object fails. Simply fixing the /I paths to be consistent is enough to fix such projects.

PCH should be a speed optimization only. There is no good reason that I know of to configure a project in such a way that it only builds if pch is in use.

Projects broken in such ways will not build under Insure++ if pch is disabled, just as they will not build under your normal compiler if pch is disabled.
Sign In or Register to comment.