我想知道 Makefile.am 中 *_la_LDFLAGS 的可能值是多少?
如果我问这个问题,那是因为我想要以下内容:
Actual shared library : libA.so (or with the version number I don't care)
Symbolic links : libA-X.Y.Z.so, libA-X.so, libA.so
soname : libA-X.so
然而,这是我通过使用 -release 标志得到的结果:
Actual shared library : libA-X.Y.Z.so
Symbolic links : libA.so
soname : libA-X.Y.Z.so !!! this is not what I want
我也试过完全没有标志,得到了
Actual shared library : libA-0.0.0.so !!! 0.0.0 and not the real version
Symbolic links : libA.so, libA-0.so
soname : libA-0.so !!! 0.0.0 and not the real version
我该怎么办?我应该使用哪个标志?
提前致谢
最佳答案
你应该使用Libtool的-version-info
选项来指定库的接口(interface)版本,但是一定要阅读
how versioning works (或 here 官方手册。)
您还可以使用 -release
来使您的包的版本号更加明显,但我怀疑您永远不会得到您想要的确切命名。 Libtool 有自己的一套规则来定义如何命名文件以及根据系统创建哪些符号链接(symbolic link):这些实际上应该被视为如何安装共享库的实现细节。
关于c++ - Automake : what are the valid values for *_la_LDFLAGS in Makefile. 上午?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/254132/