Specify name of shared object (shared library)

纵饮孤独 提交于 2019-12-24 09:38:49

问题


The names Go compiler generates for shared objects are bad. Example:

go install -buildmode=shared -linkshared github.com/apache/thrift/lib/go/thrift code.google.com/p/go-uuid/uuid

Produces shared object named: libgithub.com-apache-thrift-lib-go-thrift,code.google.com-p-go-uuid-uuid.so (I need to link together about thirty packages, and this would create a file name several KB large). Reading through go help build and related documentation I don't see anywhere any options for specifying the shared object name. I tried -o but it's not supported. As an interesting aside, if you call go install --ldflags "-o foo", then Go compiler crashes with an NPE...

来源:https://stackoverflow.com/questions/39577936/specify-name-of-shared-object-shared-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!