Search code examples
linkerwebassembly

Linking error while bulding code with WASM


I am building C++ code using wasm(emsdk version 3.1.3) and cmake(3.15.5) and am getting the following error: -

wasm-ld: error: /Users/...somePath.../boost/boost_thread/libboost_thread.a(thread.obj): undefined symbol: __wasm_lpad_context

Anyone has any idea how to fix this?


Solution

  • I was able to find the answer. You need to add the flag -fwasm-exceptions to your list of compiler and linker flags.