Runtime Error! Remove dependency on MinGW



  • Hello,

    I am not sure, if this group is the right place to discuss this, guide me if not...

    I have created an application using QT SDK (4.6.2/2010.02) in QT creator. Its working fine. But if I try to compile the same code in "QT for MSVC 2008" (4.6.2) I get this run time error: Procedure entry point ??QSvgRenderer@@ could not be located in QTSvg.dll

    I believe the code dependent on MinGW. How can I remove this dependency?

    Any help or clue is much appreciated.

    Thanks in advance,
    Vicky



  • You say: QT for MSVC 2008

    is this completly build by MSVS 2008? all binaries etc?
    I hope you link against the lib files not the dlls?

    Sorry for those questions, but I have already seen such things....



  • Hello Gerolf,

    Many thanks for your reply.

    I am linking it with the most required libraries, some of them are:
    opengl32.lib
    glu32.lib
    gdi32.lib
    user32.lib
    C:\Qt\4.6.2\lib\qtmain.lib
    C:\Qt\4.6.2\lib\QtSvg4.lib
    C:\Qt\4.6.2\lib\Qt3Support4.lib
    C:\Qt\4.6.2\lib\QtSql4.lib
    C:\Qt\4.6.2\lib\QtXml4.lib
    C:\Qt\4.6.2\lib\QtOpenGL4.lib
    C:\Qt\4.6.2\lib\QtGui4.lib
    C:\Qt\4.6.2\lib\QtCore4.lib

    BTW, these libs were added automatically in the solution settings after I loaded the .pro file (by using the MSVC 2008 QT Plugin).

    Best Regards,
    Vicky



  • VickyB, its Qt and not QT (QuickTime)



  • did you look into QtSvg4.dll with dependency viewer? it shows you all exported functions including the mangled names. Then search in this list for exactly the same string from your linker warning.

    Perhaps there are some settings wrong, so the name mangling doesn't fit (wchar_t, RTTI, ...).

    you can post the C** exported name and the searched name (including all the @@ letters etc.) here, perhaps we see womething...

    [EDIT: fixed @-chars, Volker]



  • When I load my exe app, I get the following dependencies missing:
    https://docs.google.com/document/d/1HdXai7jzoo0QJ8Q77ikEetH992hmu-pluOGl7NS-nLo/edit?hl=en&authkey=CIbR1LwK

    This is my version of (QT 2010.02) \bin\QTSvg4.dll
    https://docs.google.com/document/d/1sCKhGtvdDOGh-NkeSSARzgA1H_SC8ZBEA6gdu86aIdA/edit?hl=en&authkey=CL6bse8D

    Clearly, I got a lot of things missing! What 'settings' influence the dependencies in a QT code? Please note, the code application was initially written in QT SDK and now I want to compile the same code in MSVC 2008. What dependencies are inherited? How can I just simply remove and/or probably re-write that part?

    Danke schön!
    Vicky



  • Hello All,

    I have resolved the issue. Thanks to Gerolf for his clue on the Dependency Walker. By using it, I was able to find the correct DLL to be used with the EXE I am running. It goes like this:

    • I compiled my application exe in release build
    • I then tried to run it, but the path was set to use QT 2010.02 (4.6.2) DLLs. However, the QT version that was set in MSVC was 4.7.1. So, many functions were found missing!
    • Later I simply changed my bin path and it worked!

    Thanks again,
    Vicky

    [EDIT: no code formatting for lists; use '*' instead of '-', Volker]



  • Hi,

    Qt MSVS integration uses the internal QTDIR and not the one from the system environment, that is correct. But you can add other versions and also use those, so you can also compile to 4.6.2.

    Regards

    Gerolf



  • Exactly! The other version(s) although should be for MSVC.
    Further, if it uses an internal path, and we cannot set it via environment variable (?) , is it a good idea to copy the DLLs with the executable?

    Thanks,
    Vicky



  • What does this all have to do with the Topic ("Runtime Error! Remove dependency on MinGW").

    Did you mix Qt libs compiled with MinGW with user code compiled with MSVS (or the other way round)?



  • mingw was wrong in this place I think.

    He moved from mingw, where it worked, to MSVC where it didn't work, and thought the switch was the problem, but it wasn't :-)



  • Hi Volker,

    As I mentioned earlier, I am new to this group AND I am confused, as correctly stated by Gerolf, forgive me for an OT!

    Now, that I have resolved the issue of switching and locating/using the korrect DLLs, my query is for correct deployment of my application. Any guidelines that you may suggest!?

    Thanks again for your time.
    Vicky



  • [quote author="VickyB" date="1297924021"]Now, that I have resolved the issue of switching and locating/using the korrect DLLs, my query is for correct deployment of my application. Any guidelines that you may suggest!?
    [/quote]

    Yep. Reading some docs: http://doc.qt.nokia.com/4.7/deployment.html and search in the forums :-)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.