Results 1 to 4 of 4

Thread: Qt4.8 to Qt5.1 sharedDLL

  1. #1
    Join Date
    Sep 2009
    Location
    phoenix, AZ
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Qt4.8 to Qt5.1 sharedDLL

    Hi,

    moving my application from QT4.8 to QT5.1, on Windows7, using Qt creator 2.7.2, MingWin 4.8 32bits.

    With Qt4.8, everything works well, moving to Qt5.1, l did the modifs with QtWidgets and other small diff.

    When i run my application, during DLL loading, i get a runtime error, without specific errors.

    In my Shared_Dll, l use Q_DECL_EXPORT, and dynamically load the DLL in my main program.

    Without going into more details, is there something changed in Qt5.1 with shared library I should know about ? I spent some time reading doc and browsing the web, nothing obvious came up so far.

    Would appreciate any insights.

    rgds,

    Michael

  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: Qt4.8 to Qt5.1 sharedDLL

    is there something changed in Qt5.1 with shared library I should know about ?
    Yes.
    Deploying an Application on Windows: Creating the Application Package

  3. #3
    Join Date
    Sep 2009
    Location
    phoenix, AZ
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt4.8 to Qt5.1 sharedDLL

    doesn't seem much changed for deployment.

    Further debugging, the "fatal error" occurs in the QT5Core.dll
    GetProcAddress(0x77130000 [MSVCRT.DLL], "_get_output_format") called from "QT5CORE.DLL" at address 0x68A58EC9 and returned 0x771A5CE8.
    Second chance exception 0xC0000005 (Access Violation) occurred in "QT5CORE.DLL" at address 0x688E2136.


    but if i compile my DLL in Debug model, works fine !!

    any tips why a DLL works fine in debug mode but not in Release ?

    rgds,

    Michael

  4. #4
    Join Date
    Sep 2009
    Location
    phoenix, AZ
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt4.8 to Qt5.1 sharedDLL

    [SOLVED]

    I was declaring my class to access the DLL with " typedef __stdcall ", changing to typedef only fix the issue when compiling the .dll in release mode.
    Not sure to understand why it made the calling function to crash, and why this is different from QT4.8 or GCC 4.7...

    anyway.

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.