2

I'm trying to use WebAssembly and libc++ for browser app. I've successfully added libc++ headers to my C++ code and compiled it. Without linking libc++ there is a need to import some functions to wasm from JS (memcpy, operator new...). But if i link clang libc++ to my code, there appears an error "wasm-ld unknown file type new.cpp.o" on linking time. OK, this is quite clear.

If i link wasi-libc and use its headers, everything works fine. But i know that if i don't want to run my code anywhere, but only on browser, i should use wasm instead of wasi. Is it true? If yes, what is the proper way to link libc++ to my code?

Denis Belov
  • 113
  • 8

0 Answers0