Tips: 使用autotools生成动态.so库文件 / Generate .so library files using autotools in Solaris and Linux
2010-02-07 22:35
861 查看
Makefile.am形式如下
lib_LTLIBRARIES=libprintinfo.la
libprintinfo_la_SOURCES=printinfo.h printinfo.cpp
注意
1 ./Configure, make之后并不会马上生成libprintinfo.so文件,而要等到make install之后,libprintinfo.so文件将会位于/usr/local/lib中。
2 需要在文件configure.in中加入一行:AC_PROG_LIBTOOL;
3 如果发生错误configure.in:18: required file `./ltmain.sh' not found,则可运行libtoolize命令生成该文件;
参考资料
1. 例解autoconf和automake生成Makefile文件,http://www.ibm.com/developerworks/cn /linux/l-makefile/;
2. 《嵌入式Linux应用程序开发详解》之3.7 使用autotools。
// The English Version
Makefile.am is like this:
lib_LTLIBRARIES=libprintinfo.la
libprintinfo_la_SOURCES=printinfo.h printinfo.cpp
Notes:
1 After "./Configure", "make", the file libprintinfo.so will not appear immediately,until you run "make install",the file libprintinfo.so will defaultly under /usr/local/lib.
2 You may need to add one line in file configure.in:AC_PROG_LIBTOOL;
3 If you meet the error of "configure.in:18: required file `./ltmain.sh' not found",you can use the command tool "libtoolize" to generate the file Itmain.sh.
lib_LTLIBRARIES=libprintinfo.la
libprintinfo_la_SOURCES=printinfo.h printinfo.cpp
注意
1 ./Configure, make之后并不会马上生成libprintinfo.so文件,而要等到make install之后,libprintinfo.so文件将会位于/usr/local/lib中。
2 需要在文件configure.in中加入一行:AC_PROG_LIBTOOL;
3 如果发生错误configure.in:18: required file `./ltmain.sh' not found,则可运行libtoolize命令生成该文件;
参考资料
1. 例解autoconf和automake生成Makefile文件,http://www.ibm.com/developerworks/cn /linux/l-makefile/;
2. 《嵌入式Linux应用程序开发详解》之3.7 使用autotools。
// The English Version
Makefile.am is like this:
lib_LTLIBRARIES=libprintinfo.la
libprintinfo_la_SOURCES=printinfo.h printinfo.cpp
Notes:
1 After "./Configure", "make", the file libprintinfo.so will not appear immediately,until you run "make install",the file libprintinfo.so will defaultly under /usr/local/lib.
2 You may need to add one line in file configure.in:AC_PROG_LIBTOOL;
3 If you meet the error of "configure.in:18: required file `./ltmain.sh' not found",you can use the command tool "libtoolize" to generate the file Itmain.sh.
相关文章推荐
- 转载:JNI 编写动态链接库 HelloNative 详细过程(也即用Java和C在Linux下动态生成并使用so文件过程)
- JNI 编写动态链接库 HelloNative 详细过程(也即用Java和C在Linux下动态生成并使用so文件过程)
- Linux-(C/C++)动态链接库生成以及使用(libxxx.so)
- Linux环境下静态库和动态库的生成和使用 (.a文件和.so文件)
- Linux-(C/C++)动态链接库生成以及使用(libxxx.so)
- linux使用php动态安装模块mysqli.so(ext/mysqlnd/mysqlnd.h: 没有那个文件或目录)
- (极力推荐)BW:How to load and generate a custom hierarchy in SAP Business Warehouse (SAP BW) without using flat files
- linux使用autotools生成可执行文件、静态库、动态库Makefile的流程介绍
- Linux下的动态链接库.so文件的使用
- Linux下的动态链接库.so文件的使用
- 【转载】在ASP.NET 2.0 中如何使用多个Sitemap文件【Using Multiple Sitemap Files in ASP.NET 2.0--英文】
- Ubuntu Hacks : Tips & Tools for Exploring, Using, and Tuning Linux
- BW:How to load and generate a custom hierarchy in SAP Business Warehouse (SAP BW) without using flat files
- 利用IDEA进行JNI开发:使用NDK生成Linux平台下的so文件
- 使用Response文件安装和配置Oracle数据库 - Installing and Configuring Oracle Database Using Response Files
- Makefile文件生成 GNU Autotools的使用方法
- Issue 71 - pymssql - Undefined symbols on Mac, CentOS, Redhat with pre-compiled build - A fast MS SQL Server client library for Python directly using C API instead of ODBC. It is Python DB-API 2.0 compliant. Works on Linux, *BSD, Solaris, Mac OS X and Win
- How to use logrotate to manage log files in linux(如何在Linux中使用logrotate去管理日志文件)
- Get and display the size of file and directory in Linux system using du command 获取和现实linux文件大小(三)
- 使用javah快速生成本地方法及生成so动态库文件