duplicate symbol issue on MacOS

Started by peterigz, October 12, 2019, 16:52:06

Previous topic - Next topic

peterigz

Hello, Catalina is out for MacOS so trying to build a 64bit version of TimelineFX but having the following compiler errors. Same code compiles fine on Windows 64bit it's only happening on Mac so I guess an XCode thing:


duplicate symbol '_png_check_keyword' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/pub.mod/libpng.mod/libpng.debug.macos.x64.a(pngset.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(pngset.c.debug.macos.x64.o)
duplicate symbol '_png_image_write_to_memory' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/pub.mod/libpng.mod/libpng.debug.macos.x64.a(pngwrite.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(pngwrite.c.debug.macos.x64.o)
duplicate symbol '_png_check_chunk_length' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(pngrutil.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/pub.mod/libpng.mod/libpng.debug.macos.x64.a(pngrutil.c.debug.macos.x64.o)
duplicate symbol '_png_zlib_inflate' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(pngrutil.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/pub.mod/libpng.mod/libpng.debug.macos.x64.a(pngrutil.c.debug.macos.x64.o)
duplicate symbol '_z_errmsg' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(zutil.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/pub.mod/zlib.mod/zlib.debug.macos.x64.a(zutil.c.debug.macos.x64.o)
duplicate symbol '_jpeg_natural_order7' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
duplicate symbol '_jpeg_natural_order6' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
duplicate symbol '_jpeg_natural_order5' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
duplicate symbol '_jpeg_natural_order4' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
duplicate symbol '_jpeg_natural_order3' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
duplicate symbol '_jpeg_natural_order2' in:
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/bah.mod/freeimage.mod/freeimage.debug.macos.x64.a(jutils.c.debug.macos.x64.o)
    /Users/peterrigby/Downloads/BlitzMaxNGLatest/mod/wx.mod/lib/macosx64/libwxjpeg-3.1.a(wxjpeg_jutils.o)
ld: 11 duplicate symbols for architecture x86_64


Looks like pub.libpng is clashing with the freeimage lib and also clashes with wx as well. Not sure what a work around might be for this, anyone got any ideas? Thanks :)

peterigz

I've basically hacked this for now and renamed the functions in the freeimage library so that they don't clash which works fine albeit a bit workaroundy :)

Derron

Raised an issue for you - let's see when it gets fixed (if it requires a fix).


bye
Ron

peterigz