usnistgov / NFIQ2

Optical live-scan and ink fingerprint image quality assessment tool
https://www.nist.gov/services-resources/software/development-nfiq-20
Other
130 stars 57 forks source link

DEBUG build type error #363

Closed sodmlx2 closed 6 months ago

sodmlx2 commented 1 year ago

Hi! guys! I'm compiling the project using this parameters:

cmake .. -A x64 `
-D CMAKE_BUILD_TYPE=Debug `
-D CMAKE_CONFIGURATION_TYPES=Debug `
-D CMAKE_TOOLCHAIN_FILE=C:\dev\vcpkg\scripts\buildsystems\vcpkg.cmake `
-D VCPKG_TARGET_TRIPLET=x64-windows-static `
-D BUILD_NFIQ2_CLI=OFF `
-D BUILD_SHARED_LIBS=OFF `

My goal is to compile as static debug (MTd).

The errors returned when I compile the project (nfiq2 algorithm)

Performing build step for 'nfiq2'
  MSBuild Version 17.7.2+d6990bcfa for .NET Framework
    Checking Build System
    Building Custom Rule /NFIQ2/NFIQ2/NFIQ2Algorithm/CMakeLists.txt
    nfiq2_cbeff.cpp
    nfiq2_data.cpp
    nfiq2_fingerprintimagedata.cpp
    nfiq2_modelinfo.cpp
    nfiq2_algorithm.cpp
    nfiq2_algorithm_impl.cpp
    nfiq2_qualityfeatures.cpp
    nfiq2_qualityfeatures_impl.cpp
    nfiq2_timer.cpp
    nfiq2_exception.cpp
    version.cpp
    module.cpp
    FDAFeature.cpp
    FJFXMinutiaeQualityFeatures.cpp
    FeatureFunctions.cpp
\NFIQ2\NFIQ2\NFIQ2Algorithm\src\features\FeatureFunctions.cpp(94,38): warning C4267: 'argument': conversion from 'size_t' to 'int', pos
Possible data loss [\NFIQ2\build\nfiq2-prefix\src\nfiq2-build\nfiq2-static-lib.vcxproj] [\NFIQ2\build\nfiq2.vcxpr
oj]
    FingerJetFXFeature.cpp
    ImgProcROIFeature.cpp
    LCSFeature.cpp
\NFIQ2\NFIQ2\NFIQ2Algorithm\src\features\LCSFeature.cpp(421,12): error C3861: 'mean': identifier not found [a\NFIQ2\build\nfiq2-prefix\src\nfiq2-build\nfiq2-static -lib.vcxproj] [\NFIQ2\build\nfiq2.vcxproj]
\NFIQ2\NFIQ2\NFIQ2Algorithm\src\features\LCSFeature.cpp(424,12): error C3861: 'mean': identifier not found [a\NFIQ2\build\nfiq2-prefix\src\nfiq2-build\nfiq2-static -lib.vcxproj] [\NFIQ2\build\nfiq2.vcxproj]
sodmlx2 commented 1 year ago

Hi!

I tested builds for x86 and x64 architectures, for debug and release. I added to the CMakelists.txt (SUPERBUILD), flag (BUILD_ZLIB=OFF) in OpenCV's argument list to handle this error:

This error occurs because the zlib is generated by two project packages: libbiomeval and opencv.

Works fine now ;) @gfiumara thanks!