visual studio解決 Cannot open precompiled header file: 'Debug/****.pch'
要解決這個問題,首先要明白*.pch檔案是什麼。precompiled header = pch,也就是檔案的預編譯頭。生成這個pch檔案與stdafx.h和stdafx.cpp檔案有關。做過大的C++工程的都知道,使用pch預編譯頭與不使用預編譯頭的編譯速度簡直是天壤之別,雖然有點誇張,但是使用這預編譯頭的確有很多好處。
如果專案比較大,需要包含的標頭檔案比較多,比如windows.h和gl.h等,還有自己寫的一些不需要經常修改的標頭檔案,就可以包含在stdafx.h裡邊,接著stdafx.cpp裡記得:
再 右鍵stdafx.cpp-->Properties-->C/C++-->Precompiled Header-->Create Compiled Header(/Yc)。
接著其他的cpp按照上面的方法設定成使用編譯頭(/Yu),再重新生成專案,就能使用預編譯頭了。
之所以會產生標題所說的問題,有可能是因為專案的拷貝,造成生成的pch與當前的環境不匹配,如果Rebuild重新生成專案還出現這樣的問題的話,就按照上面的方法從新設定即可,注意把stdafx.cpp設定成生成預編譯頭(/Yc),其他的cpp檔案使用編譯頭就行了。
例子:
stdafx.h
stdafx.cpp
就可以設定一下使用預編譯頭技術了。
相關推薦
visual studio解決 Cannot open precompiled header file: 39;Debug/****.pch39;
要解決這個問題,首先要明白*.pch檔案是什麼。precompiled header = pch,也就是檔案的預編譯頭。生成這個pch檔案與stdafx.h和stdafx.cpp檔案有關。做過大的C++工程的都知道,使用pch預編譯頭與不使用預編譯頭的編譯速度簡直是天壤之別,雖然有點誇張,但是使用這
開啟一個類檔案時出現:Cannot open precompiled header file 的錯誤的解決方法
這時因為該模組沒有包括預編譯標頭檔案“stdafx.h”的緣故。 VC用一個stdafx.cpp包含標頭檔案stdafx.h,然後在stdafx.h裡包含大部分系統標頭檔案,這 樣編譯時VC就通過編譯stdafx.cpp把大部分系統標頭檔案預編譯進來了,在Debug目錄下有 一個很大的檔案*.pch,
fatal error C1083: Cannot open precompiled header file: 'Debug/dian.pch': No such file or directoy解決
環境:Visual C++ 6.0 問題:fatal error C1083: Cannot open precompiled headerfile: 'Debug/dian.pch': No such file or directoy 解決:Visual C++6.0
關於fatal error C1083: Cannot open precompiled header file: /'Debug…….pch/': 錯 問題的解決
要想弄明白出現問題的原因還是先了解一下pch檔案吧,參考一下資料: 預編譯標頭檔案(一般副檔名為.PCH),是把一個工程中較穩定的程式碼預先編譯好放在一個檔案(.PCH)裡.這些預先編譯好的程式碼可以是任何的C/C++程式碼--甚至可以是inline函式,只它們在整個工程中是較為穩定的,即在工程開發過程中不
Cannot open precompiled header file
這個錯誤是缺少預編譯標頭檔案產生的 Project-->Properties-->Configuration Properties-->C/C++-->Precompiled Headers-->Create/Use Preccompiled
關於fatal error C1083: Cannot open precompiled header file: /'Debug/v13_3.pch/': 錯
要想弄明白出現問題的原因還是先了解一下pch檔案吧,參考一下資料: 預編譯標頭檔案(一般副檔名為.PCH),是把一個工程中較穩定的程式碼預先編譯好放在一個檔案(.PCH)裡.這些預先編譯好的程式碼可以是任何的C/C++程式碼--甚至可以是inline函式,只它們在整個工程中是較為穩定的,即在工程開發過程中不
Cannot open precompiled header file: 'Debug/socket.pch': No such file or dir
今天在VC6.0中咕噥個程式,遇到如下提示: Cannot open precompiled header file:'Debug/password.pch' No such file or directory 所謂pch,即 precompiled header 你可以開啟StdAfx.h,然後F7.
ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory 解決辦法
object init ror 文件 module libmysql 找到 str 軟連接 >>> import MySQLdbTraceback (most recent call last): File "<stdin>", line
PyCharm ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory 解決辦法
圖片 object shared 8.0 body har error err cto PyCharm ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or d
error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory解決
make scp AR object normal memcache window 2.0 HA 我是從其他服務器scp來的memcached(~~~整個文件夾的那種,windows用多了的後遺癥) 在準備運行 ./memcached -d -u root -l loca
cannot open shared object file問題解決辦法
exportLD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH LD_LIBRARY_PATH是系統連結庫的路徑變數,export Ld_LIBRARY_PATH="'pwd' :$LD_LIBRARY_PATH ”就是把"當前目錄/ "這個路徑加入到Ld_LIBRA
解決error while loading shared libraries: libXXX.so.X: cannot open shared object file: No such file
一、問題 執行hello程式時,用到了自己編寫的動態庫,在目錄/usr/local/lib目錄下,執行時出現 error while loading shared libraries: libhello.so.1: cannot open shared object file: No s
libiconv.so.2: cannot open shared object file的解決方法
收藏於 2012-04-07 遷移自個人的百度空間 -------------------------------- 重新編譯了libiconv庫之後執行原先沒有問題的程式(該程式用到了iconv庫)就出現瞭如下問題 ./a.out: error while&nb
libopencv_shape.so.3.0: cannot open shared object file: No such file or directory 解決筆記
進入目錄:/etc/ld.so.conf.d 建立:opencv.conf 新增:/opt/opencv-3.0.0/build/lib 執行:ldconfig DETAIL: (1)ldd dlsd檢視缺少哪些庫:如圖,缺少opencv相關的庫。(2)locate libopencv_imgcod
解決OpenSSL:error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No
解決OpenSSL:error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No
[解決方案]ImportError: libcublas.so.9.0: cannot open shared object file
用pip直接安裝tensorflow之後,import tensorflow的時候出現如題的錯誤。在網上找了一下,發現可能有兩種原因。 tensorflow版本與CUDA版本不匹配。這種情況下,一般
解決:CentOS下的 error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or dir
進入別人的centos,輸入命令 mysql mysqladm都會報錯,缺少這個共享庫 libmysqlclient.so.16 。 查詢下,一般都是ldconfig 沒有找到共享庫的位置,或者 軟連結的問題,但是 都是不治本的解決方案。 查詢 此檔案 相關的檔案: updatedb loca
[解決方法] ImportError: libcublas.so.9.0: cannot open shared object file
用pip直接安裝tensorflow之後,import tensorflow的時候出現如題的錯誤。在網上找了一下,發現可能有兩種原因。 tensorflow版本與CUDA版本不匹配。這種情況下,一般直接升/降級tensorflow就行(我的電腦上cuda9.0搭配tenso
解決Oracle缺少動態連結庫cannot open shared object file: No such file o;解決 Linux中python指令碼執行無問題,配置crontab定時任務報錯
注:該問題的本質是:缺少動態連結庫 20181030更: 在另一臺伺服器再次遇到類似的問題,也是直接執行python指令碼無問題,在crontab中報錯: ImportError: libclntsh.so.11.1: cannot open shared ob
解決 error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or
編譯android7.0出現問題: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory 解決方法: sudo apt-ge