Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [SOLVED] Qt 5.0.2 qmake problem
Qt 6.11 is out! See what's new in the release blog

[SOLVED] Qt 5.0.2 qmake problem

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 2 Posters 5.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GrayJo
    wrote on last edited by
    #1

    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
    @

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on last edited by
      #2

      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 += ...
      @

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GrayJo
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tucnak
          wrote on last edited by
          #4

          [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 :)

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GrayJo
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved