Results 1 to 5 of 5

Thread: Can't access dll

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

    Default Can't access dll

    I really need to get this solved and would appreciate any help someone can give me.

    I have tried in various ways to use this external library (tqsllib2.dll, compiled with Mingw) with no success.

    Here is the latest attempt.

    (I have included the library .h in my application header file}

    My pro file looks like this:
    Qt Code:
    1. INCLUDEPATH += C:\cpp\qt_projects\hrlogger_development\debug\tqsllib
    2. LIBS += -L"C:\cpp\qt_projects\hrlogger_development\debug\tqsllib"
    3. LIBS += -ltqsllib2
    To copy to clipboard, switch view to plain text mode 

    The first time I try to access the library is like this:
    Qt Code:
    1. int ret = tqsl_init();
    2. qDebug() << "ret from tqsl is " << ret;
    To copy to clipboard, switch view to plain text mode 

    tqsl_init() is defined in the tqsllib.h file I have included and the .h is in the proper directory.

    So, as Wysota would say, what is the error?
    The code compiles with no errors.

    But the error is that when I put the code in to call tqsl_init() as shown above, the application crashes as it starts. With that code commented out, the application runs normally.

    So what am I doing wrong here?

  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: Can't access dll

    Is tqsllib2.dll (whatever it is) in the PATH of the environment in which you run the executable?

  3. #3
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Can't access dll

    Can you explain "the application crashes as it starts" more?
    There are several ways why an application might crash when it starts.
    Is there any error code shown?

    Edit: when the code compiles and links without error, at least the compiler and linker were able to find the library and its prototypes.

  4. #4
    Join Date
    Jan 2009
    Location
    The Netherlands and Spain
    Posts
    150
    Thanks
    6
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Can't access dll

    Has it something to do with this:
    http://www.trymytools.com/error_dll/tqsllib2.dll.html

    If that's the case, your program seems not to be the problem...

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

    Default Re: Can't access dll

    Well Chris, it wasn't, but adding it didn't change anything.

    By crash, tbscope, here is what I mean. I am using testlib and console for easy viewing of debug messages. When I start the application, the console appears for a fraction of a second then disappears and the main window never shows. The application output shows this message:
    Starting C:\CPP\QT_Projects\HRLogger_Development\debug\HRLo gger.exe...
    C:\CPP\QT_Projects\HRLogger_Development\debug\HRLo gger.exe exited with code -1073741701

    boudie, I don't know where that website got that info, but here is the sourceforge project page for the library:http://sourceforge.net/projects/trustedqsl/ What they are saying makes no sense to me. The only people who would use this dll are amateur radio operators coding a program to digitally sign contact log records.

    Thanks for your input folks - any other ideas? This really shouldn't be that difficult but it's driving me nuts.

Similar Threads

  1. Qt 4.6.2 MS Access + Eclipse
    By gutiory in forum Qt Programming
    Replies: 1
    Last Post: 17th March 2010, 03:52
  2. web access
    By ashwinibm in forum Newbie
    Replies: 1
    Last Post: 15th January 2010, 10:27
  3. access to ftp server
    By peace_comp in forum Qt Programming
    Replies: 3
    Last Post: 31st May 2008, 16:34
  4. Database access from Qt
    By nimmyj in forum Qt Programming
    Replies: 1
    Last Post: 23rd November 2006, 06:51
  5. Access widgets
    By Gayathri in forum Newbie
    Replies: 2
    Last Post: 17th November 2006, 14:37

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.