Closed orangeC23 closed 1 year ago
The problem is that -nodefaultlibs
.. that option tells the linker not to link libclang-rt which contains those math symbols.
I would try simply removing -nodefaultlibs -lc
. If you really want to specify your own libc there is a separate -nolibc
option.
Thanks a lot! It works now !
The C program is :
Use command
../../../../WASI/wasi-sdk-20.0/bin/clang --target=wasm32-unkown-wasi --sysroot=../../../../WASI/wasi-sysroot -nodefaultlibs -lc tmp.c -o tmp.wasm
to compile it into WASM binaries.It reports: