ar

libtool vs ar for creating a static library (xcode linker)

Creating a static library on Mac 10.5 with xcode via libtool and with ar via the command line both generate a libMainProject.a file however, when trying to use the one generate by libtool to link into a xcode application I end up with multiple message like "vtable for project1 referenced from: _ZTV27project1$non _lazy _ ptr in libMain...

Improve ar archiving performance

I have a project with a huge amount of auto-generated code, which we build into a static library before linking into the final executable. We use gcc/gnat 5.04a There are so many files, we have to break the job into batches and invoke ar multiple times to construct the library (in order to avoid the command-line length limitation), e.g...

Linking static libraries to other static libraries

I have a small piece of code that depends on many static libraries (a_1-a_n). I'd like to package up that code in a static library and make it available to other people. My static library, lets call it X, compiles fine. I've created a simple sample program that uses a function from X, but when I try to link it to X, I get many errors...

Possible to use a .dll on Linux

Question: Is it possible to compile a program on linux using a .dll file? Where this is going: This .dll will be used to write a php extension to some proprietary software from a third party. Background and Research: I have been given a library called proprietary.lib. I was curious, as I have never seen the .lib extension before, so ...

glibc version used while building .a file

Is there a way to find out from .a file what version of glibc is expected or was used when building the .a? ...

static library creation

in general we use ar rcs command to create a static library on unix. what does the flag 's' mean over here man page says Do not generate an archive symbol table. This can speed up building a large library in several steps. The resulting archive can not be used with the linker. In order to build a symbol table, yo...

Clobber existing file with ar

When using ar with an archive name that already exists, this message is generated: + ar rcs /tmp/libcpfs.a.3nbsv /tmp/cpfs.c.ERGsn /tmp/log.c.1lk6G ar: /tmp/libcpfs.a.3nbsv: File format not recognized The existing archive name is either an empty file (created by mktemp). I want to clobber whatever contents are there anyway, the conte...

How do I tell `gar` or `ar` to output `elf32-i386` output?

When I look at the help output from gar -h, it tells me: [...] gar: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux [...] How can I instruct gar to create an elf32-i386 output? ...

How to merge two "ar" static libraries into one

Hi I have 2 static linux libraries, created by ar cr, libabc.a and libxyz.a. I want to merge them into one static library libaz.a. How can I do this. I want to create a merged static library, not to give both libraries to final link of applications ...