Results 1 to 9 of 9

Thread: DLL won't load

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Location
    USA
    Posts
    300
    Thanks
    82
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default DLL won't load

    I compiled a 3rd party library (developing on Windows) to create the dll.
    To my knowledge it is not dependent on any other dll, since it is built using the static libraries it needs, expat, zlib, and openssl, all of which I compiled to create the .a files. The dll creates with no errors.

    The problem is the dll won't load for my Qt application.
    Here is the code:
    Qt Code:
    1. QLibrary tqsllib2;
    2. tqsllib2.setFileName("c:/cpp/qt_projects/hrlogger_development/debug/tqsllib2.dll");
    3. tqsllib2.load();
    4.  
    5. qDebug() << "is tqsllib2 loaded ? " << tqsllib2.isLoaded();
    6. qDebug() << "lib load error is " << tqsllib2.errorString();
    To copy to clipboard, switch view to plain text mode 
    The debug returns:
    is tqsllib2 loaded ? false
    lib load error is "Cannot load library c:/cpp/qt_projects/hrlogger_development/
    debug/tqsllib2.dll: "

    If I try to load a test dll using the above code, like a small one from the Windows/system32 directory, it loads fine. I realize this is not a Qt issue, but am hoping someone with more experience at this might be able to give me some suggestions as to what is going wrong.

    Edit: If I point the setFileName to the original directory where the dll was created, the error message changes slightly:
    lib load error is "Cannot load library c:/mingw/msys/1.0/home/wayne/tqsllib/tqs
    llib2.dll: The specified module could not be found."
    Last edited by waynew; 24th October 2010 at 21:01.

Similar Threads

  1. How to load DLL(C/C++) in Qt on Windows?
    By josecarlosmissias in forum Newbie
    Replies: 1
    Last Post: 20th November 2009, 15:52
  2. how do load image
    By yuvaraj.yadav in forum Qt Programming
    Replies: 5
    Last Post: 21st April 2009, 05:31
  3. Unable to load jpg on Mac OS
    By sgmurphy19 in forum Qt Programming
    Replies: 14
    Last Post: 31st January 2008, 12:49
  4. More CPU Load when using SetText
    By arunvv in forum Newbie
    Replies: 3
    Last Post: 23rd January 2008, 19:35
  5. Qt4 does not load JPG's.
    By Teuniz in forum Qt Programming
    Replies: 3
    Last Post: 3rd September 2007, 23:06

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.