我在我的C項目中使用了預編譯頭文件,但我們正在將.CPP文件整合到項目中。混合C和C++預編譯頭文件
這裏的錯誤:
Error 1 fatal error C1853: 'Debug\MuffinFactory.pch' precompiled header
file is from a previous version of the compiler, or the precompiled header is C++
and you are using it from C (or vice versa)
c:\users\blake\desktop\projects\muffinfactory\source\main.cpp 1
我們只需要在我們的項目編制一個.CPP,但我們真的需要預編譯頭,以節省編譯時間(WINDOWS.H和更多)。
我該如何組織我的項目來做到這一點?
你可以將C編譯爲C++嗎? –
這不太可能是你試圖像這樣結合的最後一個問題。通常的問題是試圖將一些.C插入到C++項目中,而不是相反。 –
新手stdafx.h - http://www.viva64.com/en/b/0265/ – 2014-07-15 07:33:29