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
180
questions
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 ...
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 (...
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 ...
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 ...
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:
...
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 ...
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?
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 ...
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
...
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?
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.
...
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 ...
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 ...
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 ...
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 ...