Results 1 to 4 of 4

Thread: How to View Classes and Functions inside .so library file

  1. #1
    Join Date
    Oct 2011
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default How to View Classes and Functions inside .so library file

    I have created a library function libtest.so
    I need to know the class and method names inside the library.
    Is there any method in QLibrary to view class and method names .

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to View Classes and Functions inside .so library file

    You have created this library but you cannot read the source code or headers to know what is in the library?

    QLibrary requires you to know the names you want to use.

    On Linux you can us the "nm --demangle" command on dynamic libraries that have not been stripped.

  3. #3
    Join Date
    Oct 2011
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to View Classes and Functions inside .so library file

    Thanks for ur reply
    Through linux Commands i can view the class names.
    But i want it through QT ( QLibrary/QPluginLoader)

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to View Classes and Functions inside .so library file

    Read the source of the library. Qt hands resolution of names in dynamic libraries to the underlying operating system, dlopen() and dlsym() on Linux, and reports success or failure. QLibrary has no list of symbols to give you.

    AFAIK, there is no glibc function that lists all symbols. You'll have to write your own, or use one written by someone else (look for libelf library) or perhaps the Binary File Descriptor library from GNU binutils.

Similar Threads

  1. how to document classes and member functions?
    By jackal in forum Qt Programming
    Replies: 15
    Last Post: 9th April 2011, 22:02
  2. Replies: 1
    Last Post: 16th March 2011, 08:10
  3. Replies: 5
    Last Post: 17th November 2010, 17:29
  4. Replies: 7
    Last Post: 15th January 2010, 20:45
  5. Question about functions in classes
    By cwnelatury in forum Newbie
    Replies: 1
    Last Post: 13th May 2009, 06:05

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.