DllMain quirks with ENABLE_RELOCATABLE
The ENABLE_RELOCATABLE
feature is implemented via a DllMain
function in lib poppler. This implies that this feature is restricted not only to WIN32 but also to using shared libs.
However, lib poppler
which carries this DllMain
definition is not build as a shared lib with MSVC: https://gitlab.freedesktop.org/poppler/poppler/-/blob/master/CMakeLists.txt#L587-592. In this way, poppler causes a symbol clash when trying to build another DLL which uses DllMain
, for example GDAL:
poppler.lib(GlobalParams.cc.obj) : warning LNK4006: DllMain already defined in gdaldllmain.obj; second definition ignored
(Mentioned here: https://github.com/OSGeo/gdal/issues/4701#issuecomment-950944044. Now appeared in updating poppler in vcpkg.)