【代碼問題】MatConvNet+VS2017編譯找不到cl.exe錯誤


用vl_compilenn做普通的CPU編譯報錯:

'cl.exe' 不是內部或外部命令,也不是可運行的程序
或批處理文件。
錯誤使用 vl_compilenn>check_clpath (line 656)
Unable to find cl.exe

 

環境:Win10+VS2017+Matlab2017b+MatConvNet1.25

 

很明顯是找不到cl.exe的位置

將646行左右的cl_path = fullfile(cc.Location, 'VC', 'bin', 'amd64');  (該語句在check_clpath函數內)改成

cl_path='D:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\Hostx64\x64'; 即可解決

 

用vl_compilenn做GPU編譯也有類似報錯:

Failed to run D:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx64/cl.exe (系統找不到指定的文件。  

也是找不到cl.exe

問題出現在大概426行左右, cl_path = fileparts(check_clpath());把check_clpath解析出的路徑的最后一層目錄給丟掉了。改成cl_path = check_clpath();即可

 

更改完了出現:

tmpxft_000001f0_00000000-1.cpp
nvcc fatal : Host compiler targets unsupported OS.

 

。。。。。只好換VS2015編譯。杯具。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM