QT Variable which contains loading the QtGuid4.lib



  • Hi there, im under windows and make fails to find the QtGuid4.lib
    this is because its on this machine with the .a extension, namly libQtGuid4.lib

    i had a problem with 2 other libs but solved it with the following:
    QMAKE_LIBS_QT_ENTRY= libqtmain.a libqtmaind.a

    sadly, the libQtGuid4.lib dependency seems to be in another variable and i dont find this variable.

    help?


  • Moderators

    any chance you are mixing compilers?
    Try to compile your project with mingw and use a Qt compiled with msvc (or vice versa)?



  • the libs of qt are compile with gcc i think, yes.
    but thats not my problem right now.
    there seems to be library compatibility.
    my problem is that the visual studio 2010 compilers try to load .lib's, which is perfectly fine but on my machine they are named .a
    so i just want qmake search for the lib's with an .a extension in the case of the qt libs.
    compilation of those libs with visual studio 2010 to get those libs with .lib extension is not an option.
    also i am lacking administrator rights to rename a lib like this, and it shouldnt be anyways.

    So, what i need to know is where qmake stores the string which contains QtGuid4.lib to rewrite it to QtGuid4.a, which is present

    any ideas?


  • Moderators

    just to clarify something:
    You can't simply take "any" Qt version and link it against other libs compiled with an arbitrary other compiler. You need to use the same compiler that Qt used! Event he compiler version mostly need to match.

    MSVC names its libs for linking with an *.lib extension, where gcc does name it with an *.a extension.



  • i know, but it alrady worked with
    QMAKE_LIBS_QT_ENTRY= libqtmain.a libqtmaind.a
    to get those libs linked in correctly and to use the libs with a .a extension even with msvc compiler.

    BUT, where does qmake store the required lib libQtGuid4.a

    I want to rerwrite the matching variable, if it exists, from
    ANNOYING_VARIABLE=/path/to/qt/gui/libs/libQtGuid4.lib
    to
    ANNOYING_VARIABLE=/path/to/qt/gui/libs/libQtGuid4.s



  • in the last line, i meant
    ANNOYING_VARIABLE=/path/to/qt/gui/libs/libQtGuid4.a
    of course


  • Moderators

    sorry... had a typo in my last post. Of course it should be:
    [quote author="raven-worx" date="1385733885"]
    You can't simply take "any" Qt version and link it against other libs compiled with an arbitrary other compiler. [/quote]
    So don't mix up binaries compiled with another compiler than the one you compiled your binaries.



  • i already thought of the "not"
    no problem ;)

    i still want to test it because it worked without the libqtguid4.a



  • of course you were right that they're incompatible =P
    my bad.
    i posted at the leapmotion forum, if they could provide a gcc compiled library for those who have the same problem.
    i'll post the link here too, if someone stumbles about this:
    https://community.leapmotion.com/t/leapmotion-lib-compiled-with-gcc-on-windows/273/3
    [quote author="raven-worx" date="1385735829"]sorry... had a typo in my last post. Of course it should be:
    [quote author="raven-worx" date="1385733885"]
    You can't simply take "any" Qt version and link it against other libs compiled with an arbitrary other compiler. [/quote]
    So don't mix up binaries compiled with another compiler than the one you compiled your binaries.

    [/quote]


Log in to reply
 

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