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

Compile shared library on Windows #366

Closed RudyB closed 10 months ago

RudyB commented 10 months ago

Goal I would like to integrate NFIQ2 into an application I am developing on Windows.

Requirement My application requires that all libraries are linked dynamically.

Background I am understand that the default compilation of NFIQ2 only supports static linking due to the dependence on a specific version of OpenCV. I attempted to modify the NFIQ2 cmake file to compile a shared version of the library however when I try to link to my application it complains that the WIN CRT symbols are already compiled statically.

Question How can I compile NFIQ2 into a shared library with CMake and MSVC 2019?

gfiumara commented 10 months ago

There's a bit more work that needs to be done to link dynamically and it hasn't been a priority yet. For one, there's some modifications of the compiler flags that overwrites what CMake would normally do. Build system needs to be cleaned up a bit first to work correctly.

That said, I am closing this ticket because it is a duplicate of #56 as a documented need.