Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-28088

Creating Blank Qt Widgets Application demonstrates "Allocation of incomplete type" Error/Warnings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • Qt Creator 8.0.1
    • C/C++/Obj-C++ Support
    • None
    • WIndows 10 21H2 with all current updates. 16Gb Ram Gen 4 CPU,
    • Windows

    Description

      Qt Open Source. Deployed MinGW Qt 5.15.2 and MinGW Qt 6.3.1 (issue same in all versions) only. Full deploys of these kits for MinGW only.

       

      Select File/New Project/Application Qt/Qt Widgets Application

      Click Choose

      (Project Location and Name is irrelevant; using the default "untitled")

      Click Next

      Define Build System: qmake (note that cmake is also deployed)

      Click Next

      (Details all default)

      Click Next

      (Translation - Defaults)

      Click Next

      Kits: Select Desktop Qt 5.15.2 MinGW 64 Bit OR Desktop Qt 6.3.1 MinGW 64 Bit

      Click Next

      (Summary - Accept Defaults)

      Click Finish

      (wait for all components to generate and for systems to update etc.)

          • Comment: We have a blank, starting template. ***

      Select Build / Run qmake (or in fact run etc).

      All compiles BUT code demonstrates issues as shown in attachment.

      Summarised: 

      All issues in file MainWindow.cpp (auto generated)

      (a) C:\Users\stepheni.HOME\Documents\Qt Projects\untitled\mainwindow.cpp:2: error: 'ui_mainwindow.h' file not found

      (b) C:\Users\stepheni.HOME\Documents\Qt Projects\untitled\mainwindow.cpp:6: error: Allocation of incomplete type 'Ui::MainWindow'

      (c) C:\Users\stepheni.HOME\Documents\Qt Projects\untitled\mainwindow.cpp:8: error: Member access into incomplete type 'Ui::MainWindow'

      (d) C:\Users\stepheni.HOME\Documents\Qt Projects\untitled\mainwindow.cpp:13: warning: Deleting pointer to incomplete type 'Ui::MainWindow' may cause undefined behavior

      (See proof attached)

       

      Note that Default templates should just work. These throw issues.

      Note that code compiles and executes.

       

       

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            freddofrog Freddo Frog
            Freddo Frog Freddo Frog
            Freddo Frog Freddo Frog
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes