Skip to main content

Questions tagged [unix-ar]

The Unix archiver utility, used primarily for maintaining static libraries. For questions about augmented reality, use [augmented-reality], not this tag.

unix-ar
12 votes
2 answers
7k views

Is using --start-group and --end-group when linking faster than creating a static library?

If one builds static libraries in one's build scripts and one wants to use those static libraries in linking the final executable, the order one mentions the .a files is important: g++ main.o hw.a ...
Johannes Schaub - litb's user avatar
12 votes
5 answers
4k views

`ar` library override timestamp

the .a archive format header requires a timestamp. This has led to countless headaches when I rebuild a static library, mainly because I can't exactly reproduce the original binary. For example (...
Foo Bah's user avatar
  • 26k
4 votes
1 answer
2k views

Merge multiple static libraries into one GCC scons

I'm building this library, libmyproject.a I want it to include several other static libraries (libone.a and libtwo.a), so that the application that links with libmyproject doesn't have to link with ...
Florin's user avatar
  • 2,931
2 votes
1 answer
3k views

Creating a .deb with Apache Ant and without dpkg

I'm trying to create a buildfile for creating .deb installation files. So far, so fine. My goal is to avoid dpkg, so that the build can be done from any plattform. Now that I created all the ...
daniel's user avatar
  • 3,166
16 votes
4 answers
9k views

Static library having object files with same name (ar)

A bit context. Let's say I have source files, which need to end up in a static library. Let's say there are two cpp files a.cpp and a.cpp located in two different subdirectories. Something like this: ...
murrekatt's user avatar
  • 6,089
133 votes
9 answers
113k views

How to merge two "ar" static libraries into one?

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 ...
osgx's user avatar
  • 92.6k
0 votes
1 answer
750 views

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?
Ross Rogers's user avatar
  • 24.1k
1 vote
1 answer
276 views

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 ...
Matt Joiner's user avatar
2 votes
1 answer
687 views

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 ...
Vijay's user avatar
  • 66.7k
1 vote
1 answer
294 views

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?
user287468's user avatar
25 votes
5 answers
114k views

Possible to use a .dll on Linux [duplicate]

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. ...
random_hero's user avatar
178 votes
6 answers
147k views

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 ...
Jason Sundram's user avatar
2 votes
1 answer
384 views

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 ...
Schamp's user avatar
  • 302
3 votes
1 answer
3k views

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 ...
Allen's user avatar
  • 71
15 votes
3 answers
19k views

Combining static libraries

Suppose I have three C static libraries say libColor.a which depends on *libRGB.*a which in turn depends on libPixel.a . The library libColor.a is said to depend on library libRGB.a since there are ...
AIB's user avatar
  • 6,014

15 30 50 per page
1
8 9 10 11
12