Emscript compilation not working with ofxGui

Hi,

I’m trying to compile a sketch using Emscript.

It works fine with an example or with a personal simple sketch, but as soon as I try something a little more complex, it’s not working:

In particular during linking I get :

wasm-ld: error: symbol exported via --export not found: __cxa_is_pointer_type
wasm-ld: error: symbol exported via --export not found: __cxa_can_catch

Can I use deque and shared_ptr with it?

Full output below:

wasm-ld: warning: function signature mismatch: StrIODecTerm
>>> defined as (i32) -> void in /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/FreeImage/lib/emscripten/libfreeimage.a(JXRTranscode.o)
>>> defined as (i32) -> i32 in /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/FreeImage/lib/emscripten/libfreeimage.a(strdec.o)

wasm-ld: warning: function signature mismatch: StrIOEncTerm
>>> defined as (i32) -> void in /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/FreeImage/lib/emscripten/libfreeimage.a(JXRTranscode.o)
>>> defined as (i32) -> i32 in /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/FreeImage/lib/emscripten/libfreeimage.a(strenc.o)

wasm-ld: warning: function signature mismatch: encodeMB
>>> defined as (i32, i32, i32) -> void in /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/FreeImage/lib/emscripten/libfreeimage.a(JXRTranscode.o)
>>> defined as (i32, i32, i32) -> i32 in /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/FreeImage/lib/emscripten/libfreeimage.a(strenc.o)

wasm-ld: error: symbol exported via --export not found: __cxa_is_pointer_type
wasm-ld: error: symbol exported via --export not found: __cxa_can_catch
em++: error: '/Users/pierretardif/Documents/EmScript/emsdk/upstream/bin/wasm-ld -o /var/folders/56/w56xrf2s2cv484vsmymkdkvc0000gn/T/emscripten_temp_8u_q0lgs/NFT_180_TheStrand.wasm obj/emscripten/Release/src/ofApp.o obj/emscripten/Release/src/main.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenSoundStream.o -L/Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/system/local/lib /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenVideoPlayer.o -L/Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/system/lib /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenSoundPlayer.o -L/Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/cache/wasm /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenVideoGrabber.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenURLFileLoader.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxAppEmscriptenWindow.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxBaseGui.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxColorPicker.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxSliderGroup.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxToggle.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxButton.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxGuiGroup.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxInputField.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxLabel.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxPanel.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxSlider.o /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.bc /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/FreeImage/lib/emscripten/libfreeimage.a /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/boost/lib/emscripten/libboost_system.a /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/boost/lib/emscripten/libboost_filesystem.a /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/freetype/lib/emscripten/libfreetype.bc /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/pugixml/lib/emscripten/libpugixml.bc /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/tess2/lib/emscripten/libtess2.a /Users/pierretardif/Documents/of_v0.11.2_osx_release/libs/uriparser/lib/emscripten/liburiparser.a /Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/cache/wasm/libc.a /Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/cache/wasm/libcompiler_rt.a /Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/cache/wasm/libc-wasm.a /Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/cache/wasm/libc++-noexcept.a /Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/cache/wasm/libc++abi-noexcept.a /Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/cache/wasm/libdlmalloc.a /Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/cache/wasm/libpthread_stub.a /Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/cache/wasm/libc_rt_wasm.a /Users/pierretardif/Documents/EmScript/emsdk/upstream/emscripten/cache/wasm/libsockets.a -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --allow-undefined-file=/var/folders/56/w56xrf2s2cv484vsmymkdkvc0000gn/T/tmpyu12wu2e.undefined --import-memory --import-table --strip-debug --export main --export malloc --export free --export stackSave --export stackRestore --export stackAlloc --export __data_end --export __wasm_call_ctors --export fflush --export __errno_location --export setThrew --export _get_tzname --export _get_daylight --export _get_timezone --export __cxa_is_pointer_type --export __cxa_can_catch --export realloc --export testSetjmp --export saveSetjmp -z stack-size=5242880 --initial-memory=134217728 --entry=main --max-memory=134217728 --global-base=1024' failed (1)

[Edit]
It seems that the problem is coming from ofxGui, once removed, it works fine.

Any tips?

Best,

P