Reputation: 193
Is it possible to convert or maybe extract a file from .la library to .a?
I've a project where I have my application linked statically against all libraries, but some of them are generated with libtool (.la libs), while others are created with gcc (.a lib). In this answer one says, that in the .libs subdirectory should be .a libfile, but I've found there only .la, .so, and .o files, probably because the lib project was not configured with --enable-static.
Upvotes: 2
Views: 3289
Reputation: 16305
that in the .libs subdirectory should be .a libfile, but I've found there only .la, .so, and .o files, probably because the lib project was not configured with --enable-static.
That's what it sounds like to me as well. You'll need to do that to get a .a
file. The libs you are building with libtool
are probably being compiled with gcc
.
Is it possible to convert or maybe extract a file from .la library to .a?
No. There's no object code in a .la
file to extract to a .a
file. As the link to the other answer says, it's basically a metadata file of how to link and where the files are, etc. A .la
file is humanly readable, so if you really want to know what's going in there you can examine it.
Upvotes: 2