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. How to solve MAKEFILE_GENERATOR variable not set as a result of parsing: ... error ?
Forum Updated to NodeBB v4.3 + New Features

How to solve MAKEFILE_GENERATOR variable not set as a result of parsing: ... error ?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
23 Posts 2 Posters 8.8k 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.
  • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

    @jsulm I get one error QMainWindow not found in my header file. I am building for windows not for android. but my package was qt-opensource-windows-x86-android-5.8.0.exe. thanks.

    Hasibul Hasan ChowdhuryH Offline
    Hasibul Hasan ChowdhuryH Offline
    Hasibul Hasan Chowdhury
    wrote on last edited by
    #7

    OK. if Qt 5.8.0 MinGW 32bit not for android. How to build my project for both windows and android ? What version should I download ? But if i install qt 5.5 it works fine. Where is the problem ?

    jsulmJ 1 Reply Last reply
    0
    • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

      OK. if Qt 5.8.0 MinGW 32bit not for android. How to build my project for both windows and android ? What version should I download ? But if i install qt 5.5 it works fine. Where is the problem ?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #8

      @Hasibul-Hasan-Chowdhury The Kit you are using now is for Windows. You should use Qt Online Installer. Then you will have Qt Maintenance Tool which you can use to easily install all needed Qt versions - for example Qt for Android. For Android you need more than just Qt, see http://doc.qt.io/qt-5/androidgs.html

      Regarding your problem: I asked in my previous posts some questions. You still did not answer. So, again:

      1. Check the Kit: are there errors or warnings?
      2. Did you include QMainWindow header file?
      #include <QMainWindow>
      

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      Hasibul Hasan ChowdhuryH 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Hasibul-Hasan-Chowdhury The Kit you are using now is for Windows. You should use Qt Online Installer. Then you will have Qt Maintenance Tool which you can use to easily install all needed Qt versions - for example Qt for Android. For Android you need more than just Qt, see http://doc.qt.io/qt-5/androidgs.html

        Regarding your problem: I asked in my previous posts some questions. You still did not answer. So, again:

        1. Check the Kit: are there errors or warnings?
        2. Did you include QMainWindow header file?
        #include <QMainWindow>
        
        Hasibul Hasan ChowdhuryH Offline
        Hasibul Hasan ChowdhuryH Offline
        Hasibul Hasan Chowdhury
        wrote on last edited by
        #9

        @jsulm Yes sir. I include it into header file. But it show a red circle and say QMainWindow not found.

        jsulmJ 2 Replies Last reply
        0
        • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

          @jsulm Yes sir. I include it into header file. But it show a red circle and say QMainWindow not found.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #10

          @Hasibul-Hasan-Chowdhury But are you able to build?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          Hasibul Hasan ChowdhuryH 1 Reply Last reply
          0
          • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

            @jsulm Yes sir. I include it into header file. But it show a red circle and say QMainWindow not found.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #11

            @Hasibul-Hasan-Chowdhury Also if you changed Qt version you should delete the build directory, run qmake again and then build.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • jsulmJ jsulm

              @Hasibul-Hasan-Chowdhury But are you able to build?

              Hasibul Hasan ChowdhuryH Offline
              Hasibul Hasan ChowdhuryH Offline
              Hasibul Hasan Chowdhury
              wrote on last edited by
              #12

              @jsulm No. When I hit the build button, I get this
              16:23:10: Running steps for project DatabaseTutorial...
              16:23:10: Starting: "G:\IDE\Qt5.8.0\5.8\mingw53_32\bin\qmake.exe" "G:\PROJECTS\Qt Projects\DatabaseTutorial\DatabaseTutorial.pro" -spec win32-g++
              MAKEFILE_GENERATOR variable not set as a result of parsing : DatabaseTutorial.pro. Possibly qmake was not able to find files included using "include(..)" - enable qmake debugging to investigate more.
              16:23:10: The process "G:\IDE\Qt5.8.0\5.8\mingw53_32\bin\qmake.exe" exited with code 3.
              Error while building/deploying project DatabaseTutorial (kit: Desktop Qt 5.8.0 MinGW 32bit)
              The kit Desktop Qt 5.8.0 MinGW 32bit has configuration issues which might be the root cause for this problem.
              When executing step "qmake"

              jsulmJ 1 Reply Last reply
              0
              • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

                @jsulm No. When I hit the build button, I get this
                16:23:10: Running steps for project DatabaseTutorial...
                16:23:10: Starting: "G:\IDE\Qt5.8.0\5.8\mingw53_32\bin\qmake.exe" "G:\PROJECTS\Qt Projects\DatabaseTutorial\DatabaseTutorial.pro" -spec win32-g++
                MAKEFILE_GENERATOR variable not set as a result of parsing : DatabaseTutorial.pro. Possibly qmake was not able to find files included using "include(..)" - enable qmake debugging to investigate more.
                16:23:10: The process "G:\IDE\Qt5.8.0\5.8\mingw53_32\bin\qmake.exe" exited with code 3.
                Error while building/deploying project DatabaseTutorial (kit: Desktop Qt 5.8.0 MinGW 32bit)
                The kit Desktop Qt 5.8.0 MinGW 32bit has configuration issues which might be the root cause for this problem.
                When executing step "qmake"

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #13

                @Hasibul-Hasan-Chowdhury This is not the same as "QMainWindow not found". Something is wrong with your .pro file or Kit (you still not checked it as I suggested). Is it possible to upload your project to somewhere and post link here, so I can download it and check?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                Hasibul Hasan ChowdhuryH 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Hasibul-Hasan-Chowdhury This is not the same as "QMainWindow not found". Something is wrong with your .pro file or Kit (you still not checked it as I suggested). Is it possible to upload your project to somewhere and post link here, so I can download it and check?

                  Hasibul Hasan ChowdhuryH Offline
                  Hasibul Hasan ChowdhuryH Offline
                  Hasibul Hasan Chowdhury
                  wrote on last edited by
                  #14

                  @jsulm Wait for me sir. I am sending screenshots and details.

                  Hasibul Hasan ChowdhuryH 1 Reply Last reply
                  0
                  • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

                    @jsulm Wait for me sir. I am sending screenshots and details.

                    Hasibul Hasan ChowdhuryH Offline
                    Hasibul Hasan ChowdhuryH Offline
                    Hasibul Hasan Chowdhury
                    wrote on last edited by
                    #15

                    @Hasibul-Hasan-Chowdhury I can not upload the screenshots in this forum. I am adding whole code for you.

                    I have checked kit and I found
                    Yellow ! Android for armeabi (GCC 4.9, Qt 5.5.1)
                    Android for armeabi (GCC 4.9, Qt 5.5.1)
                    Android for armeabi-v7a (GCC 4.9, Qt 5.5.1)
                    Android for armeabi-v7a (GCC 4.9, Qt 5.5.1)
                    Android for x86 (GCC 4.9, Qt 5.5.1)
                    Android for x86 (GCC 4.9, Qt 5.5.1)

                    Without Yellow ! Android for armeabi-v7a (GCC 4.9, Qt 5.8.0)
                    Android for x86 (GCC 4.9, Qt 5.8.0)
                    Desktop Qt %{Qt:Version} MinGW 32bit

                    kit version Yellow ! Qt %{Qt:Version} MinGW 32bit

                    Hasibul Hasan ChowdhuryH 1 Reply Last reply
                    0
                    • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

                      @Hasibul-Hasan-Chowdhury I can not upload the screenshots in this forum. I am adding whole code for you.

                      I have checked kit and I found
                      Yellow ! Android for armeabi (GCC 4.9, Qt 5.5.1)
                      Android for armeabi (GCC 4.9, Qt 5.5.1)
                      Android for armeabi-v7a (GCC 4.9, Qt 5.5.1)
                      Android for armeabi-v7a (GCC 4.9, Qt 5.5.1)
                      Android for x86 (GCC 4.9, Qt 5.5.1)
                      Android for x86 (GCC 4.9, Qt 5.5.1)

                      Without Yellow ! Android for armeabi-v7a (GCC 4.9, Qt 5.8.0)
                      Android for x86 (GCC 4.9, Qt 5.8.0)
                      Desktop Qt %{Qt:Version} MinGW 32bit

                      kit version Yellow ! Qt %{Qt:Version} MinGW 32bit

                      Hasibul Hasan ChowdhuryH Offline
                      Hasibul Hasan ChowdhuryH Offline
                      Hasibul Hasan Chowdhury
                      wrote on last edited by
                      #16

                      @Hasibul-Hasan-Chowdhury
                      .pro file
                      #-------------------------------------------------

                      Project created by QtCreator 2017-03-07T16:05:57

                      #-------------------------------------------------

                      QT += core gui

                      QT += widgets

                      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

                      TARGET = DatabaseTutorial
                      TEMPLATE = app

                      The following define makes your compiler emit warnings if you use

                      any feature of Qt which as been marked as deprecated (the exact warnings

                      depend on your compiler). Please consult the documentation of the

                      deprecated API in order to know how to port your code away from it.

                      DEFINES += QT_DEPRECATED_WARNINGS

                      You can also make your code fail to compile if you use deprecated APIs.

                      In order to do so, uncomment the following line.

                      You can also select to disable deprecated APIs only up to a certain version of Qt.

                      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

                      SOURCES += main.cpp
                      mainwindow.cpp

                      HEADERS += mainwindow.h

                      FORMS += mainwindow.ui

                      header file

                      #ifndef MAINWINDOW_H
                      #define MAINWINDOW_H

                      #include <QMainWindow>

                      namespace Ui {
                      class MainWindow;
                      }

                      class MainWindow : public QMainWindow
                      {
                      Q_OBJECT

                      public:
                      explicit MainWindow(QWidget *parent = 0);
                      ~MainWindow();

                      private:
                      Ui::MainWindow *ui;
                      };

                      #endif // MAINWINDOW_H

                      source file
                      #include "mainwindow.h"
                      #include "ui_mainwindow.h"

                      MainWindow::MainWindow(QWidget *parent) :
                      QMainWindow(parent),
                      ui(new Ui::MainWindow)
                      {
                      ui->setupUi(this);
                      }

                      MainWindow::~MainWindow()
                      {
                      delete ui;
                      }

                      main file
                      #include "mainwindow.h"
                      #include <QApplication>

                      int main(int argc, char *argv[])
                      {
                      QApplication a(argc, argv);
                      MainWindow w;
                      w.show();

                      return a.exec();
                      

                      }

                      xml gui file

                      <?xml version="1.0" encoding="UTF-8"?>
                      <ui version="4.0">
                      <class>MainWindow</class>
                      <widget class="QMainWindow" name="MainWindow">
                      <property name="geometry">
                      <rect>
                      <x>0</x>
                      <y>0</y>
                      <width>400</width>
                      <height>300</height>
                      </rect>
                      </property>
                      <property name="windowTitle">
                      <string>MainWindow</string>
                      </property>
                      <widget class="QWidget" name="centralWidget"/>
                      <widget class="QMenuBar" name="menuBar">
                      <property name="geometry">
                      <rect>
                      <x>0</x>
                      <y>0</y>
                      <width>400</width>
                      <height>21</height>
                      </rect>
                      </property>
                      </widget>
                      <widget class="QToolBar" name="mainToolBar">
                      <attribute name="toolBarArea">
                      <enum>TopToolBarArea</enum>
                      </attribute>
                      <attribute name="toolBarBreak">
                      <bool>false</bool>
                      </attribute>
                      </widget>
                      <widget class="QStatusBar" name="statusBar"/>
                      </widget>
                      <layoutdefault spacing="6" margin="11"/>
                      <resources/>
                      <connections/>
                      </ui>

                      when i run this project I got the previous error.

                      Thanks.

                      jsulmJ 1 Reply Last reply
                      0
                      • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

                        @Hasibul-Hasan-Chowdhury
                        .pro file
                        #-------------------------------------------------

                        Project created by QtCreator 2017-03-07T16:05:57

                        #-------------------------------------------------

                        QT += core gui

                        QT += widgets

                        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

                        TARGET = DatabaseTutorial
                        TEMPLATE = app

                        The following define makes your compiler emit warnings if you use

                        any feature of Qt which as been marked as deprecated (the exact warnings

                        depend on your compiler). Please consult the documentation of the

                        deprecated API in order to know how to port your code away from it.

                        DEFINES += QT_DEPRECATED_WARNINGS

                        You can also make your code fail to compile if you use deprecated APIs.

                        In order to do so, uncomment the following line.

                        You can also select to disable deprecated APIs only up to a certain version of Qt.

                        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

                        SOURCES += main.cpp
                        mainwindow.cpp

                        HEADERS += mainwindow.h

                        FORMS += mainwindow.ui

                        header file

                        #ifndef MAINWINDOW_H
                        #define MAINWINDOW_H

                        #include <QMainWindow>

                        namespace Ui {
                        class MainWindow;
                        }

                        class MainWindow : public QMainWindow
                        {
                        Q_OBJECT

                        public:
                        explicit MainWindow(QWidget *parent = 0);
                        ~MainWindow();

                        private:
                        Ui::MainWindow *ui;
                        };

                        #endif // MAINWINDOW_H

                        source file
                        #include "mainwindow.h"
                        #include "ui_mainwindow.h"

                        MainWindow::MainWindow(QWidget *parent) :
                        QMainWindow(parent),
                        ui(new Ui::MainWindow)
                        {
                        ui->setupUi(this);
                        }

                        MainWindow::~MainWindow()
                        {
                        delete ui;
                        }

                        main file
                        #include "mainwindow.h"
                        #include <QApplication>

                        int main(int argc, char *argv[])
                        {
                        QApplication a(argc, argv);
                        MainWindow w;
                        w.show();

                        return a.exec();
                        

                        }

                        xml gui file

                        <?xml version="1.0" encoding="UTF-8"?>
                        <ui version="4.0">
                        <class>MainWindow</class>
                        <widget class="QMainWindow" name="MainWindow">
                        <property name="geometry">
                        <rect>
                        <x>0</x>
                        <y>0</y>
                        <width>400</width>
                        <height>300</height>
                        </rect>
                        </property>
                        <property name="windowTitle">
                        <string>MainWindow</string>
                        </property>
                        <widget class="QWidget" name="centralWidget"/>
                        <widget class="QMenuBar" name="menuBar">
                        <property name="geometry">
                        <rect>
                        <x>0</x>
                        <y>0</y>
                        <width>400</width>
                        <height>21</height>
                        </rect>
                        </property>
                        </widget>
                        <widget class="QToolBar" name="mainToolBar">
                        <attribute name="toolBarArea">
                        <enum>TopToolBarArea</enum>
                        </attribute>
                        <attribute name="toolBarBreak">
                        <bool>false</bool>
                        </attribute>
                        </widget>
                        <widget class="QStatusBar" name="statusBar"/>
                        </widget>
                        <layoutdefault spacing="6" margin="11"/>
                        <resources/>
                        <connections/>
                        </ui>

                        when i run this project I got the previous error.

                        Thanks.

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #17

                        @Hasibul-Hasan-Chowdhury Does your .pro file really contain comments without # character at the beginning? It should be like this:

                        TARGET = DatabaseTutorial
                        TEMPLATE = app
                        #The following define makes your compiler emit warnings if you use
                        

                        Regarding yellow warnings: keep mouse cursor over the Kit - you will see then what the problem is.

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        Hasibul Hasan ChowdhuryH 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @Hasibul-Hasan-Chowdhury Does your .pro file really contain comments without # character at the beginning? It should be like this:

                          TARGET = DatabaseTutorial
                          TEMPLATE = app
                          #The following define makes your compiler emit warnings if you use
                          

                          Regarding yellow warnings: keep mouse cursor over the Kit - you will see then what the problem is.

                          Hasibul Hasan ChowdhuryH Offline
                          Hasibul Hasan ChowdhuryH Offline
                          Hasibul Hasan Chowdhury
                          wrote on last edited by
                          #18

                          @jsulm yes

                          jsulmJ Hasibul Hasan ChowdhuryH 2 Replies Last reply
                          0
                          • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

                            @jsulm yes

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #19

                            @Hasibul-Hasan-Chowdhury Remove all the comments or comment them out

                            #-------------------------------------------------
                            Project created by QtCreator 2017-03-07T16:05:57
                            
                            #-------------------------------------------------
                            
                            QT += core gui
                            
                            QT += widgets
                            
                            greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                            
                            TARGET = DatabaseTutorial
                            TEMPLATE = app
                            
                            DEFINES += QT_DEPRECATED_WARNINGS
                            
                            SOURCES += main.cpp \
                            mainwindow.cpp
                            
                            HEADERS += mainwindow.h
                            
                            FORMS += mainwindow.ui
                            

                            DEFINES += QT_DEPRECATED_WARNINGS can be removed as well.
                            Add \ after SOURCES += main.cpp
                            Run qmake again and build.

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

                              @jsulm yes

                              Hasibul Hasan ChowdhuryH Offline
                              Hasibul Hasan ChowdhuryH Offline
                              Hasibul Hasan Chowdhury
                              wrote on last edited by
                              #20

                              @Hasibul-Hasan-Chowdhury should I remove this ?

                              Hasibul Hasan ChowdhuryH 1 Reply Last reply
                              0
                              • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

                                @Hasibul-Hasan-Chowdhury should I remove this ?

                                Hasibul Hasan ChowdhuryH Offline
                                Hasibul Hasan ChowdhuryH Offline
                                Hasibul Hasan Chowdhury
                                wrote on last edited by
                                #21

                                @Hasibul-Hasan-Chowdhury same error

                                Hasibul Hasan ChowdhuryH jsulmJ 2 Replies Last reply
                                0
                                • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

                                  @Hasibul-Hasan-Chowdhury same error

                                  Hasibul Hasan ChowdhuryH Offline
                                  Hasibul Hasan ChowdhuryH Offline
                                  Hasibul Hasan Chowdhury
                                  wrote on last edited by
                                  #22

                                  @Hasibul-Hasan-Chowdhury when i run qmake get above error again. where is the problem ?

                                  1 Reply Last reply
                                  0
                                  • Hasibul Hasan ChowdhuryH Hasibul Hasan Chowdhury

                                    @Hasibul-Hasan-Chowdhury same error

                                    jsulmJ Offline
                                    jsulmJ Offline
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #23

                                    @Hasibul-Hasan-Chowdhury Please upload the pro file to somewhere and post a link here. Then I can check.
                                    And please check what is wrong with your "Desktop Qt 5.8.0 MinGW 32bit" Kit.

                                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    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