在使用wasi-libc时,我尝试使用fopen读取图像
#include <stdio.h>
int main()
{
FILE *f = fopen("test.png", "rb");
printf("file %p\n", f);
fclose(f);
}使用Clang构建代码:
$ clang --target=wasm32-wasi --sysroot=/opt/wasi-sdk/share/wasi-sysroot/ test.c -o test.wasm
$ wasmtime test.wasm
$ file 0它返回NULL。我怎样才能解决这个问题?
发布于 2019-10-22 16:58:32
已修复:
wasmtime --dir=. test.wasmhttps://stackoverflow.com/questions/58500419
复制相似问题