wx build command
mingw32-make -j6 -f makefile.gcc CXXFLAGS="-m32 -std=gnu++14 -D_WIN32_IE=0x0603" BUILD=release SHARED=0 MONOLITHIC=1 UNICODE=1 USE_XRC=1 USE_OPENGL=1
Platform and version information
Description of the problem
When linking (statically) against a third party lib that has zlib v1.2.12 included (like libCURL, for example), you get a "multiple definitions" error for:
crc32_combine_op
crc32_combine_gen
crc32_combine_gen64
This was not the case for v1.2.11 of zlib.
The API between these version (v1.2.11 and v1.2.12) has changed and exactly these methods where moved into public (zlib.h).
I've seen that in:
wxWidgets]\src\zlib\zconf.h
...you do a masking of zlib function by using a specific wx prefix. But to be honest I don't fully understand the macros and comments.
Is it the case that this can easily be fixed by adding some prefix to these new public functions? But where? (This will require a recompilation of wx, obviously.)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Some more digging... I believe in:
[wxWidgets]\src\zlib\zconf.h
...this section should be modified from:
# define crc32 Z_ADD_PREFIX(crc32)
# define crc32_combine Z_ADD_PREFIX(crc32_combine)
# define crc32_combine64 Z_ADD_PREFIX(crc32_combine64)
...to:
# define crc32 Z_ADD_PREFIX(crc32)
# define crc32_combine Z_ADD_PREFIX(crc32_combine)
# define crc32_combine64 Z_ADD_PREFIX(crc32_combine64)
+# define crc32_combine_op Z_ADD_PREFIX(crc32_combine_op)
...and additionally this section from:
# undef adler32_combine
# define adler32_combine Z_ADD_PREFIX_STD(adler32_combine)
# undef crc32_combine
# define crc32_combine Z_ADD_PREFIX_STD(crc32_combine)
...to:
# undef adler32_combine
# define adler32_combine Z_ADD_PREFIX_STD(adler32_combine)
# undef crc32_combine
# define crc32_combine Z_ADD_PREFIX_STD(crc32_combine)
+# undef crc32_combine_op
+# define crc32_combine_op Z_ADD_PREFIX_STD(crc32_combine_op)
...and the same for the other 2 methods.
Does that sound correct or am I missing something?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Hi,
What if yo drop the MONOLITHIC from the build configuration and use WITH_ZLIB=0 instead?
Thank you.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Hi, I think this is the same as #22280 and should have been fixed in master by #22341.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Indeed, this should be already fixed in master/will be fixed in 3.1.7.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #22427.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
For the record: I tried the GIT version and yes, it fixes this error. Thank you and sorry for not noticing the duplicate.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()