www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - creating static library

reply Phoenix <phoenix flareware.cz> writes:
hello, is there any way how to create static library (.a) on linux?
i tried 'ar -pca mylib.a file1.o file2.o ...', but it broke on 'unknown 
file format (file1.o)' :(
Jun 30 2006
next sibling parent Frank Benoit <keinfarbton nospam.xyz> writes:
Phoenix schrieb:
 hello, is there any way how to create static library (.a) on linux?
 i tried 'ar -pca mylib.a file1.o file2.o ...', but it broke on 'unknown
 file format (file1.o)' :(

I use this quite often on linux: "ar -r -s -v lib.a a.o b.o ...."
Jun 30 2006
prev sibling parent BCS <BCS pathlink.com> writes:
Phoenix wrote:
 hello, is there any way how to create static library (.a) on linux?
 i tried 'ar -pca mylib.a file1.o file2.o ...', but it broke on 'unknown 
 file format (file1.o)' :(

I used: ar -q mylib.a file1.o ... a few days ago (Redhat Linux). This assumes that mylib.a doesn't yet exist.
Jun 30 2006