mac编译wat报错解决方案

按照github的步骤一步步来的时候,最后一步出现问题,

ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/lib/libcrypto.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [CMakeFiles/wasm.dir/build.make:829:libwasm.dylib] 错误 1
gmake[1]: *** [CMakeFiles/Makefile2:1875:CMakeFiles/wasm.dir/all] 错误 2
gmake: *** [Makefile:149:all] 错误 2

使用下面的方案即可解决

$ rm -rf *
$ cmake -DOPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1" ..
$ cmake -DOPENSSL_LIBRARIES="/usr/local/opt/openssl@1.1/lib" ..
$ make

posted @ 2023-02-02 15:47  公众号python学习开发  阅读(48)  评论(0编辑  收藏  举报