You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling static library v1.16.2 with CMake and Visual Studio 2019, all the libheif functions are being exported.
This causes all consumers of this library to have a large list of libheif functions exported from resulting executables.
I see that setting the BUILD_SHARED_LIBS=Off option does not result in a macro definition LIBHEIF_STATIC_BUILD .
Setting LIBHEIF_STATIC_BUILD manually causes compiler errors.
Initially, it seems to work (no error) and I get a .a file. But when I try to compile ImageMagick it fails (various missing references). The last version I could compile a static IM binary with is 1.15.2 - I guess due to the autotools still existing there. Sth. seems to be wrong with the CMake static builds...
Just for the record: I've finally gotten to the bottom of this and could for the first successfully compile ImageMagick with a more recent CMake-based libheif (1.19.5). The solution is to add aom and de265 manually to the linker when compiling ImageMagick like so:
export LIBS='-laom -lde265'
Interestingly, this was never necessary with the old autotools-based libheif. This could of course also be the solution for other things you might want to compile with a static libheif.
When compiling static library v1.16.2 with CMake and Visual Studio 2019, all the libheif functions are being exported.
This causes all consumers of this library to have a large list of libheif functions exported from resulting executables.
I see that setting the
BUILD_SHARED_LIBS=Off
option does not result in a macro definitionLIBHEIF_STATIC_BUILD
.Setting
LIBHEIF_STATIC_BUILD
manually causes compiler errors.The text was updated successfully, but these errors were encountered: