VS2015增量編譯,加快編譯速度

2022-01-13 06:42:57 字數 741 閱讀 6041

起因:

之前工程設定的好好的, 改動乙個檔案,必定是只編譯該檔案相關的。然而最近就是無論是否改動檔案,都會有部分檔案重新編譯。

解決流程:

檢視增量編譯的設定

1.1 因為工程是在debug模式下,so清空了該目錄下的檔案

1.2 檢視配置,發現一切正常

project-properties-configuration properties-c/c++-code generation –enable minimal rebuild:yes(/gm)

project-properties-configuration properties-c/c++-general-debug information format:program database(/zi)

project-properties-configuration properties-linker-general-enable incremental linking:yes(/incremental)

tool-options-projects and solutions-build and run-具體如下

2.檢視編譯的檔案多依賴的標頭檔案,雖然確定的確沒改過,但是還是乙個乙個地去檢視修改日期。

然後發現問題了。。。

原來是因為之前要測試乙個功能,將本地時間改為乙個月後,後來雖然本地改回來了,但是可能有些誤操作,導致有些檔案的修改時間》當前時間。做個時間倒序,發現老是重編的檔案都是檔案的修改時間》當前時間的。

VS2015靜態編譯設定

首先必須搞清楚專案 專案屬性 配置屬性 c c 生成 執行庫中四個選項的關係 多執行緒除錯dll mdd 對應 md dynamicdebug 多執行緒dll md 對應 md dynamicrelease 多執行緒 mt 對應 md staticrelease 多執行緒 mtd 對應 md sta...

vs2015編譯dlib,測試

dlib vs2015編譯 測試 使用cmake生成文件 使用vs2015編譯,成功,靜態庫 使用demo測試 include stdafx.h include dlib image processing frontal face detector.h include dlib image io.h...

VS2015編譯ffmpeg總結

安裝vs2015 不在累述 安裝git工具 一直下一步即可 git clone ffmpeg smp project get dependencies.bat vsnasm.zip vsyasm.zip 解壓後 vsnasm vsyasm 通過 vs2015開發人員命令提示 注意通過管理員身份 執行...