mac 下编译的问题
erasin opened this issue · 3 comments
erasin commented
直接编译hello的时候报错
Compiling hello v0.0.0 (/Users/...../workspace/phper/examples/hello)
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-m64" "-arch" "x86_64" "-L" "/Users/.........-lc" "-lm" "-liconv"
= note: Undefined symbols for architecture x86_64:
....
然后给项目追加了文件下 .cargo/config.toml
文件
[build]
[target.x86_64-apple-darwin]
rustflags = ["-Clink-args=-Wl,-undefined,dynamic_lookup"]
编译和测试可以走通
jmjoy commented
帮忙提交一下pr呗
erasin commented
我新建了个测试项目发现引用的phper后,项目本身在mac环境下也是需要追加 .cargo/config 编译配置,linux平台下则不需要配置. 所以建议在文档中说明.