Open helje5 opened 3 years ago
Thanks for the ping: this repo is pretty out of date so a lot of things may not work right... I tried to reproduce and I found that on x86_64 macos it worked with libwasmer.a
but not with libwasmer.dylib
clang -I$HOME/.wasmer/include -L$HOME/.wasmer/lib wasmer-c-api-example.c -o test-simple -lwasmer
➜ wasmer-c-api git:(master) ✗ ./test-simple
Compile result: 1
Hello, World!
Call result: 1
I'm not sure why it wasn't working with the dylib:
./test-simple
dyld: Library not loaded: @rpath/libwasmer.dylib
Referenced from: /Users/mark/temp/wasmer-c-api/./test-simple
Reason: image not found
[1] 69683 abort ./test-simple
I'm not using the dylib. The steps I mentioned repro for me all the time.
(Presumably it doesn't work for you because you don't have ~/.wasmer/lib in your DYLIB path.)
When running the non-WASI example, the invocation fails due to the import failing.
Steps I took:
.dylib
so that the linker picks up the .a (not sure it matters)<wasmer.h>
:test-simple