Cant build DlibDotNet.Native - load_png error C2780
popy2k14 opened this issue · 1 comments
popy2k14 commented
Summary of your issue
I have followed the tutorial for Winwdows (https://github.com/takuya-takeuchi/DlibDotNet/wiki/Tutorial-for-Windows)
and run into a compiling issue.
Environment
Windows 10 build 2004
Visual Studio 2017 15.9.31
What did you do when you faced the problem?
- deleted, new checkout and rebuild -> same issue.
- Tried with "master" & "Branch_19.21.0" branch -> same issue.
Example code:
c:\Temp\FaceRecognitionDotNet\src\DlibDotNet\src\DlibDotNet.Native>pwsh Build.ps1 Debug cpu 64 desktop
Build DlibDotNet.Native
Reset modification of C:\Temp\FaceRecognitionDotNet\src\DlibDotNet\src\dlib
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19041.
-------------------------------------------------------
-- CMAKE_SYSTEM_INFO_FILE: Platform/Windows
-- CMAKE_SYSTEM_NAME: Windows
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- CMAKE_SYSTEM: Windows-10.0.19041
-- CMAKE_C_COMPILER: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
-- CMAKE_CXX_COMPILER: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
-- os_version_suffix:
-- Project: C:/Temp/FaceRecognitionDotNet/src/DlibDotNet/src/DlibDotNet.Native
-- Binaries: C:/Temp/FaceRecognitionDotNet/src/DlibDotNet/src/DlibDotNet.Native/build_win_desktop_cpu_x64
-------------------------------------------------------
-- Using CMake version: 3.15.5
-- Compiling dlib version: 19.20.99
-- Enabling AVX instructions
-- C++11 activated.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Temp/FaceRecognitionDotNet/src/DlibDotNet/src/DlibDotNet.Native/build_win_desktop_cpu_x64
Microsoft (R)-Build-Engine, Version 15.9.21+g9802d43bc3 für .NET Framework
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
dlib.vcxproj -> C:\Temp\FaceRecognitionDotNet\src\DlibDotNet\src\DlibDotNet.Native\build_win_desktop_cpu_x64\dlib_
build\Debug\dlib19.20.99_debug_64bit_msvc1916.lib
load_png.cpp
c:\temp\facerecognitiondotnet\src\dlibdotnet\src\dlibdotnet.native\dlib\image_loader\load_png.h(58): error C2672: "d
lib::load_png": keine übereinstimmende überladene Funktion gefunden [C:\Temp\FaceRecognitionDotNet\src\DlibDotNet\sr
c\DlibDotNet.Native\build_win_desktop_cpu_x64\DlibDotNetNative.vcxproj]
c:\temp\facerecognitiondotnet\src\dlibdotnet\src\dlibdotnet.native\dlib\image_loader\load_png.h(63): error C2780: "v
oid dlib::load_png(image_type &,const std::string &)": Erwartet 2 Argumente - 3 unterstützt [C:\Temp\FaceRecognition
DotNet\src\DlibDotNet\src\DlibDotNet.Native\build_win_desktop_cpu_x64\DlibDotNetNative.vcxproj]
c:\temp\facerecognitiondotnet\src\dlibdotnet\src\dlib\dlib\image_loader/png_loader.h(206): note: Siehe Deklaration
von "dlib::load_png"
c:\Temp\FaceRecognitionDotNet\src\DlibDotNet\src\DlibDotNet.Native>
Output:
c:\temp\facerecognitiondotnet\src\dlibdotnet\src\dlibdotnet.native\dlib\image_loader\load_png.h(58): error C2672: "d
lib::load_png": keine übereinstimmende überladene Funktion gefunden [C:\Temp\FaceRecognitionDotNet\src\DlibDotNet\sr
c\DlibDotNet.Native\build_win_desktop_cpu_x64\DlibDotNetNative.vcxproj]
c:\temp\facerecognitiondotnet\src\dlibdotnet\src\dlibdotnet.native\dlib\image_loader\load_png.h(63): error C2780: "v
oid dlib::load_png(image_type &,const std::string &)": Erwartet 2 Argumente - 3 unterstützt [C:\Temp\FaceRecognition
DotNet\src\DlibDotNet\src\DlibDotNet.Native\build_win_desktop_cpu_x64\DlibDotNetNative.vcxproj]
What did you intend to be?
There should be no compile error´?
popy2k14 commented
Solved, thanks to this answer: https://www.gitmemory.com/issue/takuya-takeuchi/DlibDotNet/107/496322105
After downloading the current dlib release (currently19.21) from http://dlib.net/ and replace the dlib folder in DlibDotNet\src\ i have successfully built an Debug DlibDotNet.Native.dll
Hope this helps somebody :-)