Thread: checking if it's a library file .a or .so

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    52

    checking if it's a library file .a or .so

    Hi everyone,

    What shell command can I use to check what files are .a's or so's?

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by afflictedd2 View Post
    Hi everyone,

    What shell command can I use to check what files are .a's or so's?
    Hmm. If it ends with .a, then it ends with .a. And if it ends with .so, then it ends with .so.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    Are you on windows or unix?
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

  4. #4
    Registered User
    Join Date
    Jun 2008
    Posts
    62
    in *nix your command should look something like

    updatedb
    Gives all .a and .so files
    locate *.a *.so
    Gives just .a files
    locate *.a
    Gives just .so files
    locate *.so

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by afflictedd2 View Post
    Hi everyone,

    What shell command can I use to check what files are .a's or so's?
    Do you want to list all .so/.a file in your system, or see if program XX uses libYY.so?

    "ldd xx" will give you a list of the shared libraries used by a particular library.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. algorithm for duplicate file checking help
    By geekoftheweek in forum C Programming
    Replies: 1
    Last Post: 04-04-2009, 01:46 PM
  2. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  3. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  4. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM