歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> linux autotools libtool 生成庫版本號設置方法

linux autotools libtool 生成庫版本號設置方法

日期:2017/3/3 13:01:47   编辑:Linux技術

測試項目名:libHelloc

項目類型:Autotools Shared Library Project

修改 libHelloc/Makefile.am

# Linker options libTestProgram
libHelloc_la_LDFLAGS = -release 0.1.123
清理並重新生成項目:

$ make clean

$ autoreconf -i

$ ./configure

$ make

$ sudo make install

生成的文件如下:

-rwxr-xr-x. 1 root    root       12072 5月   9 14:50 libHelloc-0.1.123.so
-rw-r--r--. 1 root    root       12730 5月   9 14:50 libHelloc.a
-rwxr-xr-x. 1 root    root         945 5月   9 14:50 libHelloc.la
lrwxrwxrwx. 1 root    root          20 5月   9 14:50 libHelloc.so -> libHelloc-0.1.123.so

Copyright © Linux教程網 All Rights Reserved