Results 1 to 4 of 4

Thread: How to load library on linux dynamically?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to load library on linux dynamically?

    Quote Originally Posted by zhehongwang View Post
    Hello, everyone.
    Qt Code:
    1. QLibrary mylib("./libtest");
    2. if (mylib.isLoaded())
    3. // message 1
    4. else
    5. // message 2
    To copy to clipboard, switch view to plain text mode 

    The result is that the library cannot be loaded, as the message 2 is always shown.

    Any suggestion?
    I'd try to add a line
    Qt Code:
    1. mylib.load();
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Aug 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to load library on linux dynamically?

    I think I've found the problem. I should put the libtest.so file under the /lib or /usr/lib, or use ldconfig instead.

    Thanks all

Similar Threads

  1. how does Qt know the library path in LINUX
    By babu198649 in forum General Programming
    Replies: 1
    Last Post: 14th November 2008, 17:10

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.