Hi! I am trying to static link SkiaSharp native wasm libraries. I’ve tried to use their builds, my custom builds (on mac and linux ubuntu). But I get error on linking:
error: undefined symbol: _ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17__assign_externalEPKcm (referenced by top-level compiled C/C++ code)
warning: Link with -s LLD_REPORT_UNDEFINED to get more information on undefined symbols
warning: To disable errors for undefined symbols use -s ERROR_ON_UNDEFINED_SYMBOLS=0
warning: __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17__assign_externalEPKcm may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17__assign_no_aliasILb0EEERS5_PKcm (referenced by top-level compiled C/C++ code)
warning: __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17__assign_no_aliasILb0EEERS5_PKcm may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17__assign_no_aliasILb1EEERS5_PKcm (referenced by top-level compiled C/C++ code)
warning: __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17__assign_no_aliasILb1EEERS5_PKcm may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE25__init_copy_ctor_externalEPKcm (referenced by top-level compiled C/C++ code)
warning: __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE25__init_copy_ctor_externalEPKcm may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNSt3__215basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strERKNS_12basic_stringIcS2_S4_EE (referenced by top-level compiled C/C++ code)
warning: __ZNSt3__215basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strERKNS_12basic_stringIcS2_S4_EE may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
emcc2: error: '/Applications/Unity/Hub/Editor/2021.2.0f1/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/node/node /Applications/Unity/Hub/Editor/2021.2.0f1/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emscripten/src/compiler.js /var/folders/18/99jndmds6px_w52xph7yfc_h0000gn/T/tmp95iw9h4c.txt' failed (1)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () (at /Users/bokken/buildslave/unity/build/Editor/Mono/B
I tried to use s LLD_REPORT_UNDEFINED in args from Emscripten args, but I cant get more info on what types were lost. I tried to ERROR_ON_UNDEFINED_SYMBOLS=0 and that does not change anything too.
Looks like there was mangling of std::basic_string<CharT,Traits,Allocator> but I dont understand how to fix it yet. Have somebody same problems with .a native libraries?