Static library how do i list

This is a discussion on Static library how do i list within the Linux Programming forums, part of the Platform Specific Boards category; Hi Experts, Could anybody help me with a unix command to list out all the static libraries that are linked ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    2

    Static library how do i list

    Hi Experts,
    Could anybody help me with a unix command to list out all the static libraries that are linked in an executable built by me in the Unix environment ?

    Say for example i have an exe a.out . I need to find all the staic libraries linked into this while building this ?

    Please do help me immedeately

    Regards,
    GG

  2. #2
    .
    Join Date
    Nov 2003
    Posts
    307
    ldd <exe filename> shows dynamically linked libraries
    nm <exe filename> shows the symbols in the file.

    To see which symbols come from static libraries requires running nm against those libraries to get a list of the symbols (functions, etc.) in them, then comparing them to what your list of symbols from nm <exefilename>.

    You compare lists with the comm command. See man comm.

    This whole thread should be in the Linux Forum, not here in C programming

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,338
    Moved
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with Free.
    By chakra in forum C Programming
    Replies: 9
    Last Post: 12-15-2008, 10:20 AM
  2. seg fault at vectornew
    By tytelizgal in forum C Programming
    Replies: 2
    Last Post: 10-25-2008, 01:22 PM
  3. Pleas take a look & give a critique
    By sh3rpa in forum C++ Programming
    Replies: 14
    Last Post: 10-19-2007, 10:01 PM
  4. Problem with linked list ADT and incomplete structure
    By prawntoast in forum C Programming
    Replies: 1
    Last Post: 04-30-2005, 01:29 AM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21