zeiss-microscopy / libCZI

Open Source Cross-Platform C++ library to read CZI image files
GNU General Public License v3.0
71 stars 19 forks source link

libCZI static not properly building #42

Closed DerekJuba-NIST closed 3 years ago

DerekJuba-NIST commented 5 years ago

When I try to build the static version of libCZI with Visual Studio on Windows, it seems to get built with __declspec(dllimport), which should only be used with the non-static dll version. This behavior is being controlled in ImportExport.h. I have found that if I manually define _STATICLIBBUILD as required by ImportExport.h, then the static version the lib is built correctly. I think there is a problem with the Visual Studio project files being generated by CMake not defining this constant when they should be.