I use vcpkg to compile darknet , and install pthreads ,opencv[ffmpeg] successfully ,
but when I run build.ps1 with powershell, The error as below:
LINK : fatal error LNK1104: Cannot open file “ucrtd.lib” [F:\darknet\build_win_debug\CMakeFiles\3.14.1\CompilerIdCXX\CompilerIdCXX.vcxproj]
Any suggestion? Thanks !
Do you have the full c++ installation for VS? It looks like the Windows SDK is incomplete. Please try to launch the VS installer and then search for the Windows SDK component and be sure to select the desktop version (the most recent one is perfect).
Also, which version of VS do you have? At the moment, the build.ps1 is able to setup automatically the environment only for VS2017. If you have VS2015, that’s the problem. Autosetup is not ready for you. Just try to fix build.ps1 by yourself, wait for someone to do it for you (I don’t have any 2015 installation to do it) or [best option if possible] just upgrade to VS2017
@cenit MSVS 2019 released :) https://visualstudio.microsoft.com/downloads/
@toplinuxsir could you please try PR #2828 ? It should contain fixes for you. Since VS2019 came out, I took the opportunity to use a more robust and also generic way to search for VS
I use vs2017 community , I have installed the windows sdk , and I find the ucrtd.lib file on the disk
But I installed the vs2017 community not the default C:\ disk ,in the D:\ disk
Thanks !
Ok so the PR should definitely help also you. Please try it and let me know
@cenit , Great , It works ! Thanks .
Another question: When I open yolo_cpp_dll_no_gpu.sln to comile, but the error as below:
1>ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) : error LNK2005: atoi already libucrt.lib(atox.obj) defined
1>ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) : error LNK2005: exit already libucrt.lib(exit.obj) defined
That solution is not built by CMake, it is a legacy solution, so it may be broken (need manual adjusting)
@toplinuxsir If you build Darknet by using Cmake or build.ps1, then use uselib.exe instead of yolo_cpp_dll_no_gpu.exe - this is the same.
@AlexeyAB I want to use yolo_cpp_dll_nogpu.dll to work with python,Yes I found uselib.exe ,but not find yolo_cpp_dll_nogpu.dll
Thanks !
@toplinuxsir
Or build build/darknet/yolo_cpp_dll_nogpu.sln to get yolo_cpp_dll_nogpu.dll
Or compile Darknet by using C:\Program Files\CMake\bin\cmake-gui.exe as on this image https://user-images.githubusercontent.com/4096485/55107892-6becf380-50e3-11e9-9a0a-556a943c429a.png just change (Enable->Enabel CUDA set OFF)
then: Configure -> Optional platform for generator (Set: x64) -> Finish -> Generate -> Open Project -> x64 & Release -> Build -> Build solution
You will get libdarklib.dll that you can just rename to yolo_cpp_dll_nogpu.dll
Most helpful comment
@cenit MSVS 2019 released :) https://visualstudio.microsoft.com/downloads/