duan36000 2015-11-29 14:04
浏览 46

Golang无法设置rpath(Mac)?

Hello currently I tried to set -rpath with pkg-config for golang, however I always get the following:

ld: -rpath can only be used when creating a dynamic final linked image
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there any way to fix it?

I tried to use LDFLAGS with -Wl,rpath and I have a pkg-config with -rpath both are failing with the same error.

I also stumbled on github on this: https://github.com/golang/go/issues/7293 Which means that it should work?

  • 写回答

0条回答 默认 最新

    报告相同问题?