補充:
1.羅列一下我在安裝使用過程中的問題
- 安裝過程中經常會出現編譯錯誤的情況,首先確保Visual Studio的語言設置為英文, 確保VS在安裝或者更新中把工具集選全一些。編譯錯誤的另一種可能就是cpu問題,關掉其他占用cpu的應用重新編譯。
- 以下錯誤網絡問題(我這個在家用代理FQ也不可以)
2.nuget package export from vcpkg(導出nuget包的命令)
- 導出命令
在安裝好的vcpkg中運行powershell輸入以下命令, id可以自己設置。
.\vcpkg.exe export opencv:x64-windows --nuget --nuget-id=Guava_opencv_dependencies -- nuget-version=1.0.1
3. create custom nuget package(創建自己的nuget包用於單個項目中)
- 首先你需要創建一個正確的nuspec文件。
可以在我的GitHub上下載https://github.com/GuavaL/.nuspec-file
- 執行以下命令生成nuget package。
首先將nuget.exe和nuspec文件放入package文件夾下。刪除原先的NUPKG文件。打開power shell或者cmd。執行以下命令:
.\nuget.exe pack .\Guava_opencv_dependencies.nuspec -NoDefaultExcludes
在項目中用自己的nuget包請參考以上參考鏈接。