library files type

Posted on 2006-05-02
Last Modified: 2012-05-05
 I thought I know all the file types, but I am not sure.  What are the following files, and who generates them?


   Am I missing any?

Question by:jmccay
    LVL 15

    Assisted Solution

    .so = shared object, equivalent to Windows .dll

    .lai  are static binary files generated during compile process and sometimes shipped in RPMs as well in -devel packages to let you build static executables using the libraries. Thing .obj in windows terms.
    LVL 34

    Assisted Solution

    by:Duncan Roe
    .a is a static library indeed.
    .la is  a libtool library file (i.e. a script) possibly required by loaders at run or compile time. The header comments advise against deleting it anyway.
    .lai is similar (libtool library file ...)
    Some .so files are also scripts - see for example /usr/lib/
    LVL 1

    Author Comment

    Is there a way to convert a .a (or .la or .lai) into a .so?

    This is sort of in the wrong forum, but it is along the same lines.

       What is a dll.a file?  I know what a dll is, but a dll.a?  (mingw compiler)

    Also, can you point me somewhere where this information can be found on the net?
    LVL 15

    Expert Comment

    >>Is there a way to convert a .a (or .la or .lai) into a .so?

    Yes of course, this is done by linking, just like you use a linker in Windows to convert .OBJ to .DLL, .EXE or .COM. It's not a manual process though, typically the makefile of the software you are building should take care of that.
    LVL 34

    Expert Comment

    by:Duncan Roe
    A conversion of .a to .so can often fail, e.g. if the .a lib wasn't compiled with -fPIC as required for code in a .so (but not in a .a).
    Information on the net? Dunno. Would be an interesting site if someone can find it...
    LVL 27

    Accepted Solution

    Try following method:

    1) Decompose your .a archive (suppose it named old_static.a):

    1.1) List files
    files=`ar -t old_static.a`
    # you will get a list of object files in that archive

    1.2) Extract all files:
    ar x old_static.a  $files
    # you will get a lot of .o files in current directory

    1.3) Check if all files are rellocatable:
    file *.o | grep -v relocatable
    # output should be empty

    2) Compose all .o files into shared library, try this:
    gcc -shared $files

    3) If 2) is OK. Check if result file is shared library:

    You may or may not have success with this method, please check and see if it works.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
    The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now