libzim icon indicating copy to clipboard operation
libzim copied to clipboard

Fix dyn compilation warning on Windows

Open mgautierfr opened this issue 1 year ago • 2 comments

When building dll on Windows we have to specify what is exported in dll.

We already export of public symbol with __declspec(dllexport).

But we have a lot of warning as our structure/class are including std symbols and we are not exporting them.

See : kiwix/kiwix-build@d2d1f68 (#703)

One solution would be to export ALL symbols in the dll but this should probably made with a generated .def file.

mgautierfr avatar Sep 02 '24 16:09 mgautierfr

@benoit74 @rgaudin I don't understand how this could then work in the pythin binding!?

kelson42 avatar Jun 08 '25 15:06 kelson42

Well the problem is not exposed clearly so it's difficult to respond.

My understanding is that we have many warnings regarding stdlib code that we do not explicitly declare. This is different from libkiwix which doesn't declare anything, hence libkiwix being static only.

The python wrapper, on Windows, ends up being a thin pyd file which is a DLL and is linked to the zim-9.dll (and ICU ones).

Image

rgaudin avatar Jun 09 '25 08:06 rgaudin