Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 442
Harjot Singh Avatar asked Sep 07 '25 16:09

Harjot Singh


1 Answers

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

like image 94
Harjot Singh Avatar answered Sep 10 '25 05:09

Harjot Singh