stachenov / quazip

Qt/C++ wrapper over minizip
Other
580 stars 233 forks source link

Duplicated symbols when linking with minizip #169

Open david-antiteum opened 1 year ago

david-antiteum commented 1 year ago

When using v1.4

One of our dependencies is using minizip. This creates a problem of symbol duplication:

duplicate symbol '_call_zopen64' in:
    /Users/Shared/vcpkg/installed/arm64-osx/debug/lib/libquazip1-qt6d.a(qioapi.cpp.o)
    /Users/Shared/vcpkg/installed/arm64-osx/debug/lib/libminizip.a(ioapi.c.o)
duplicate symbol '_call_ztell64' in:
    /Users/Shared/vcpkg/installed/arm64-osx/debug/lib/libquazip1-qt6d.a(qioapi.cpp.o)
    /Users/Shared/vcpkg/installed/arm64-osx/debug/lib/libminizip.a(ioapi.c.o)
duplicate symbol '_call_zseek64' in:
    /Users/Shared/vcpkg/installed/arm64-osx/debug/lib/libquazip1-qt6d.a(qioapi.cpp.o)
    /Users/Shared/vcpkg/installed/arm64-osx/debug/lib/libminizip.a(ioapi.c.o)
duplicate symbol '_fill_zlib_filefunc64_32_def_from_filefunc32' in:
    /Users/Shared/vcpkg/installed/arm64-osx/debug/lib/libquazip1-qt6d.a(qioapi.cpp.o)
    /Users/Shared/vcpkg/installed/arm64-osx/debug/lib/libminizip.a(ioapi.c.o)

Any way to isolate the definitions copied from minizip or to use minizip instead?

Thanks,

David

david-antiteum commented 1 year ago

Renaming this functions will do the trick: