make errors
在编译webassemblyEnclave项目时出现报错:
App/App.cpp:51:12: fatal error: editline/readline.h: No such file or directory
51 | #include <editline/readline.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:206: App/App.o] Error 1
根据帖子安装libedit相关库
sudo apt install libeditline-dev
sudo apt install libedit-dev
并在Makefile文件中添加ledit
链接
App_Cpp_Flags := $(App_C_Flags) -std=c++11 -ledit
然后再次编译遇到报错/usr/local/bin/ld: cannot find -lsgx_tstdcxx
,按照之前的记录修改即可
再次编译,即可通过
run errors
在尝试运行该程序的时候出现报错:
$ ./app --debug arith.wasm
repl: 0, debug: 1, module path: arith.wasm
Error(Enclave/wa.cpp:2018): no exported function named '_main'
Exception
需要按照wac的运行方式运行
./app --debug arith.wasm add 2 3
repl: 0, debug: 1, module path: arith.wasm
0x5
Info: SampleEnclave successfully returned.
Enter a character before exit ...