usnistgov / NFIQ2

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

Error when building with Visual Studio 2015 on Windows OS. #304

Closed yzy888 closed 3 years ago

yzy888 commented 3 years ago

Hello, I have downloaded the code NFIQ2-master to my local directory. My OS is Windows 10. After I generated the .sln File with CMake-gui 3.8.2 and I opened the .sln file with Visual Studio 2015, then I built the project named "ALL_BUILD", but I got the error "Could NOT find LibLZMA (missing: LIBLZMA_LIBRARY LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET)" when building. I tried to solve it by myself but I failed. I found that there were files about liblzma whose extention is .lib, .h or .dll in my local directory "C:\ProgramData\Anaconda3\Library", but it could not find them when cmaking. I donot know how to install liblzma on Windows to solve it. Or is there any other solutions for me to solve it? The error is as follows: 7>------ Build started: Project: nfiq2, Configuration: Debug x64 ------ 7> Building Custom Rule E:/09NFIQ/NFIQ2-master/CMakeLists.txt 7> CMake does not need to re-run because E:/09NFIQ/NFIQ2-master-BuildByCMake/CMakeFiles/generate.stamp is up-to-date. 7> Creating directories for 'nfiq2' 7> No download step for 'nfiq2' 7> No update step for 'nfiq2' 7> No patch step for 'nfiq2' 7> Performing configure step for 'nfiq2' 7> -- The C compiler identification is MSVC 19.0.24210.0 7> -- The CXX compiler identification is MSVC 19.0.24210.0 7> -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe 7> -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works 7> -- Detecting C compiler ABI info 7> -- Detecting C compiler ABI info - done 7> -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe 7> -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works 7> -- Detecting CXX compiler ABI info 7> -- Detecting CXX compiler ABI info - done 7> -- Detecting CXX compile features 7> -- Detecting CXX compile features - done 7> -- Running in PowerShell, do not use colors 7> -- Detected MSVC compiler (Windows) 7> CMake Warning at E:/09NFIQ/NFIQ2-master/NFIQ2/version.cmake:35 (message): 7> Could not retrieve git hash 7> Call Stack (most recent call first): 7> CMakeLists.txt:21 (include) 7> 7> 7> -- Found OpenCV: E:/09NFIQ/NFIQ2-master-BuildByCMake/OpenCV-prefix/src/OpenCV-build (found version "4.5.2") 7> -- Found SQLITE3: C:/ProgramData/Anaconda3/Library/include (found version "3.33.0") 7> -- Found TIFF: C:/ProgramData/Anaconda3/Library/lib/tiff.lib (found version "4.1.0") 7> CMake Error at D:/soft/cmake/cmake-3.8.2-win64-x64/share/cmake-3.8/Modules/FindPackageHandleStandardArgs.cmake:137 (message): 7> Could NOT find LibLZMA (missing: LIBLZMA_LIBRARY LIBLZMA_HAS_AUTO_DECODER 7> LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET) (found version "5.2.5") 7> Call Stack (most recent call first): 7> D:/soft/cmake/cmake-3.8.2-win64-x64/share/cmake-3.8/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE) 7> D:/soft/cmake/cmake-3.8.2-win64-x64/share/cmake-3.8/Modules/FindLibLZMA.cmake:53 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) 7> CMakeLists.txt:189 (find_package) 7> 7> 7> -- Configuring incomplete, errors occurred! 7> See also "E:/09NFIQ/NFIQ2-master-BuildByCMake/nfiq2-prefix/src/nfiq2-build/CMakeFiles/CMakeOutput.log". 7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1.

gfiumara commented 3 years ago

Unless you absolutely need to change the NFIQ 2 code, please use the pre-built libraries on the releases page. Otherwise, you will need to install all dependencies and updated the build for them. Our build currently only supports looking for dependencies on Windows via vcpkg.

yzy888 commented 3 years ago

Thank you very much. It was really vcpkg that helped me solve the problem. @gfiumara