Posts Tagged pch
Visual C++, Precompiled Headers and Windows 7
Posted by Brian Seekford in Bugs, Rants on December 5, 2009
I upgraded to Windows 7 and I really am enjoying the new interface….but….. I went to compile my ActiveX toolset projects that are all written in C++ and I started getting precompiled header errors.
So I rebuilt and rebuilt and still got the error:
Error 1 fatal error C1859: ‘.\Release/HTTP Wizard.pch’ unexpected precompiled header error, simply rerunning the compiler might fix this problem d:\SSI\C++\v3\HTTP Wizard v3\HTTPAccess.cpp 5 HTTP Wizard
So I rebuilt and rebuilt. No avail. I turned off Precompiled headers and then everything worked fine. What a pain.
It turned out the reason is due to the virtual tables being rebased by Windows 7 for security which totally screws up the precompiled header logic, which requires the headers to be in the same memory locations.
Apparently the development team at Microsoft knows about the issue and will eventually fix it. So, lets hope that service pack comes out soon.
I guess I am lucky my build machine is really beefy, but for active development having the precompiled header is nice.
So, go have a Margarita and the compiler errors won’t bother you as much…..