如何在linux用户空间中创建*.a到*.so?
我编译了文件makefile.am,我需要我的lib的共享链接,例如编译后我看到如何在linux用户空间中创建*.a到*.so?,linux,gcc,g++,userspace,Linux,Gcc,G++,Userspace,我编译了文件makefile.am,我需要我的lib的共享链接,例如编译后我看到/usr/lib64/libtest.a,但我需要libtest.so,因为我需要我的lib到其他C源文件 示例:g++-llibtest test.c 我读过这篇文章,但我不知道如何工作以及如何使用ranlib或ar,有没有办法创建*.a到*.so?我用 ./configure --disable-shared 尝试使用g++-l:libtest.a test.c或g++/usr/lib64/libtest.a
/usr/lib64/libtest.a
,但我需要libtest.so
,因为我需要我的lib到其他C源文件
示例:g++-llibtest test.c
我读过这篇文章,但我不知道如何工作以及如何使用
ranlib
或ar
,有没有办法创建*.a到*.so?我用
./configure --disable-shared
尝试使用
g++-l:libtest.a test.c
或g++/usr/lib64/libtest.a test.c
链接到静态库。a test.c不起作用,我有未定义的引用