[SOLVED] Qt 5.0.2 qmake problem



  • I have two computers at home and at work. When I install Qt 5.0.2 at work, qmake has errors. When qmake generate Makefile, it does not insert QTDIR in somewere. At home all work. System version and settings all the same. I check the environment variables and output of "qmake -query". All the same. Windows XP SP3 RUS, Visual Studio 2010. Qt 5.0.2 (from binary distribute). Path by default C:\Qt\Qt5.0.2.

    What could be wrong?

    For example Makefile.Debug, at work
    @INCPATH = -I"C:\include" -I"C:\include\QtWidgets" -I"C:\include\QtGui" -I"C:\include\QtCore" -I"debug" -I"." -I"C:\Qt\Qt5.0.2\5.0.2\msvc2010\mkspecs\win32-msvc2010"
    @
    the same place, at home
    @INCPATH = -I"....\Qt\Qt5.0.2\5.0.2\msvc2010\include" -I"....\Qt\Qt5.0.2\5.0.2\msvc2010\include\QtWidgets" -I"....\Qt\Qt5.0.2\5.0.2\msvc2010\include\QtGui" -I"....\Qt\Qt5.0.2\5.0.2\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"....\Qt\Qt5.0.2\5.0.2\msvc2010\mkspecs\win32-msvc2010"
    @
    Another example, at work
    @LIBS = qtmaind.lib /LIBPATH:/lib /lib\Qt5Widgetsd.lib /lib\Qt5Guid.lib /lib\Qt5Cored.lib libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib
    @
    at home
    @LIBS = qtmaind.lib /LIBPATH:C:\Qt\Qt5.0.2\5.0.2\msvc2010\lib C:\Qt\Qt5.0.2\5.0.2\msvc2010\lib\Qt5Widgetsd.lib C:\Qt\Qt5.0.2\5.0.2\msvc2010\lib\Qt5Guid.lib C:\Qt\Qt5.0.2\5.0.2\msvc2010\lib\Qt5Cored.lib libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib
    @
    And more, at work
    @ \bin\moc.exe $(DEFINES) $(INCPATH) -D_MSC_VER=1600 -DWIN32 mainwindow.h -o debug\moc_mainwindow.cpp
    ...
    \bin\uic.exe mainwindow.ui -o ui_mainwindow.h
    @

    at home
    @ C:\Qt\Qt5.0.2\5.0.2\msvc2010\bin\moc.exe $(DEFINES) $(INCPATH) -D_MSC_VER=1600 -DWIN32 ..\untitled\widget.h -o
    ...
    C:\Qt\Qt5.0.2\5.0.2\msvc2010\bin\uic.exe ..\untitled\widget.ui -o ui_widget.h
    @



  • Hello

    I am not well-involved in development under Windows, but why can't use QT instead of LIBS and then LIBS?:
    @
    QT += widgets gui
    LIBS += ...
    @



  • That's exactly what I do. I start QtCreator, generate an empty GUI application by master, and run it. But it does not compile. At home runs, at work no. I began the investigate. The problem is that qmake generate a Makefile with errors. And I do not understand why. This is an error in Qt, or my configuration error? The puzzle is that the two systems are configured identically, but one of them does not work.



  • [quote author="GrayJo" date="1367209848"]That's exactly what I do. I start QtCreator, generate an empty GUI application by master, and run it. But it does not compile. At home runs, at work no. I began the investigate. The problem is that qmake generate a Makefile with errors. And I do not understand why. This is an error in Qt, or my configuration error? The puzzle is that the two systems are configured identically, but one of them does not work.[/quote]

    All I can say is that Qt 95% is OK, I am almost sure that something wrong in your config, I'll try to dive into the problem tomorrow :)



  • I solve the problem. I run qmake with -d key and compare output. Important difference is
    at work
    @DEBUG 1: C:/Qt/Qt5.0.2/5.0.2/msvc2010/mkspecs/features/qt_config.prf:11: calling built-in $$list(C://mkspecs;C:\Qt\Qt5.0.2\5.0.2\msvc2010/mkspecs)
    @
    at home
    @DEBUG 1: C:/Qt/Qt5.0.2/5.0.2/msvc2010/mkspecs/features/qt_config.prf:11: calling built-in $$list(C:\Qt\Qt5.0.2\5.0.2\msvc2010/mkspecs)@
    On the drive there were traces of a failed attempt to install the beta version of Qt 5.0.0 in the directory C:\mkspec. qmake found them, and why there were problems. I just delete that directory (C:\mkspec), and the problem was solved.


Log in to reply
 

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