Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator not compiling on Windows 10
Forum Updated to NodeBB v4.3 + New Features

Qt Creator not compiling on Windows 10

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
15 Posts 5 Posters 1.3k 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.
  • AxelViennaA Offline
    AxelViennaA Offline
    AxelVienna
    wrote on last edited by
    #1

    Dear community,
    I have a complex Qt Widgets project which compiles just fine on a Linux environment. To get a Windows version, I installed Qt with MinGW from the online installer on a plain Windows 10 box. I copied the project tree, adapted .pro file source code for Windows specifics, installed all necessary libraries. I created a Windows/MinGW kit and tested if g++.exe works - it does.
    When I start compiling the project, qmake and MinGW-make finish correctly.
    g++, however, fails with "fatal error: no input files". This is where I get stuck. All sources and headers are in the project directory. I removed them from the .pro file and added them again with the "add existing file" function of Qt Creator in Windows. The .pro entries produced are identical to those in Linux. Most likely, I have made a stupid configuration mistake. I just can't find it. Help is highly appreciated.

    Compiler output:

    g++: error: WINDOWS -I../WhiteGUI -I. -I../../../Win64/include -I../
    WhiteEngine -I../WhiteEngine -I../WhiteEngine -I../WhiteEngine -IC:/Qt/6.1.2/
    mingw81_64/include -IC:/Qt/6.1.2/mingw81_64/include/QtQuickControls2 -IC:/Qt/
    6.1.2/mingw81_64/include/QtQuick -IC:/Qt/6.1.2/mingw81_64/include/QtOpenGL -
    IC:/Qt/6.1.2/mingw81_64/include/QtWidgets -IC:/Qt/6.1.2/mingw81_64/include/
    QtGui -IC:/Qt/6.1.2/mingw81_64/include/QtQmlModels -IC:/Qt/6.1.2/mingw81_64/
    include/QtQml -IC:/Qt/6.1.2/mingw81_64/include/QtNetwork -IC:/Qt/6.1.2/
    mingw81_64/include/QtCore -Idebug -I. -IC:/VulkanSDK/1.0.51.0/Include -IC:/Qt/
    6.1.2/mingw81_64/mkspecs/win32-g++  -o debug\whiteapi.o ..
    \WhiteEngine\whiteapi.cpp: No such file or directory
    g++: fatal error: no input files
    compilation terminated.```
    
    Here is my .pro file:
    QT += core gui
    QT += quickcontrols2
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++11
    CONFIG += c++17
    
    WIN64 {
           INCLUDEPATH += ../../../Win64/include
           LIBS += -L ../../../Win64/libs -lcurl
           LIBS += -L ../../../Win64/libs -lcurl
           LIBS += -L ../../../Win64/libs -ljsoncpp
           LIBS += -lstdc++fs
           LIBS += -L ../../../Win64/libs -lboost_date_time
           LIBS += -L ../../../Win64/libs -lboost_system
           LIBS += -L ../../../Win64/libs -lQXlsx
    }else{
    
    LIBS += -lcurl
    LIBS += -L/usr/local/lib64 -ljsoncpp
    LIBS += -lstdc++fs
    LIBS += -lboost_date_time
    LIBS += -lboost_system
    LIBS += -L/usr/local/lib64/QXlsx -lQXlsx
    INCLUDEPATH += /usr/include/glibc-2.0
    INCLUDEPATH += /usr/local/include
    }
    # Compile defs for WhiteAPI class
    DEFINES -= WHITEAPI
    DEFINES += WHITEGUI
    
    RESOURCES +=resources.qrc \
        ../../../Frontend/BreezeStyleSheets-master/breeze.qrc
    
    # You can make your code fail to compile if it uses deprecated APIs.
    # In order to do so, uncomment the following line.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    SOURCES += \
        ../WhiteEngine/whiteapi.cpp \
        ../WhiteEngine/whitedata.cpp \
        ../WhiteEngine/whitefile.cpp \
        ../WhiteEngine/whitejson.cpp \
        ../WhiteEngine/whitelog.cpp \
        ../WhiteEngine/whiterequest.cpp \
        ../WhiteEngine/whitestatus.cpp \
        ../WhiteEngine/whitetimer.cpp \
        ../WhiteEngine/whitetools.cpp \
        ../WhiteEngine/whitetranslator.cpp \
        ../WhiteEngine/apikey.cpp \
        apiwizard.cpp \
        detailam.cpp \
        detailar.cpp \
        detailrender.cpp \
        importfile.cpp \
        main.cpp \
        models.cpp \
        notyfier.cpp \
        whitebar.cpp \
        whiteclient.cpp \
        whiteconfig.cpp \
        whitegui.cpp \
        whitelogin.cpp \
        whitetimerpopup.cpp \
        whiteview.cpp
    
    HEADERS += \
        ../WhiteEngine/WhiteDefs.h \
        ../WhiteEngine/WhiteIncludes.h \
        ../WhiteEngine/apikey.h \
        ../WhiteEngine/whiteapi.h \
        ../WhiteEngine/whitedata.h \
        ../WhiteEngine/whitefile.h \
        ../WhiteEngine/whitejson.h \
        ../WhiteEngine/whitelog.h \
        ../WhiteEngine/whiterequest.h \
        ../WhiteEngine/whitestatus.h \
        ../WhiteEngine/whitetimer.h \
        ../WhiteEngine/whitetools.h \
        ../WhiteEngine/whitetranslator.h \
        apiwizard.h \
        detailam.h \
        detailar.h \
        detailrender.h \
        importfile.h \
        models.h \
        notyfier.h \
        whitebar.h \
        whiteclient.h \
        whiteconfig.h \
        whitegui.h \
        whitelogin.h \
        whitetimerpopup.h \
        whiteview.h
    
    FORMS += \
        apiwizard.ui \
        detailam.ui \
        detailar.ui \
        detailrender.ui \
        importfile.ui \
        models.ui \
        whiteconfig.ui \
        whitegui.ui \
        whitelogin.ui \
        whitetimerpopup.ui \
        whiteview.ui
    
    INCLUDEPATH += ../WhiteEngine
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    
    FORMS += \
        APIKeyGUI.ui
    
    INCLUDEPATH += ../WhiteEngine
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    DISTFILES +=
    
    
    FORMS += \
        APIKeyGUI.ui \
        models.ui
    
    INCLUDEPATH += ../WhiteEngine
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    
    FORMS += \
        APIKeyGUI.ui
    
    INCLUDEPATH += ../WhiteEngine
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    DISTFILES +=

    C++ and Python walk into a bar. C++ reuses the first glass.

    jsulmJ 1 Reply Last reply
    0
    • AxelViennaA AxelVienna

      You are right, it is not in the .pro file. It is set in the project settings for the compile kit under “additional commands”. I use that excessively to trigger conditional code for different targets.
      As your suggested command line input delivers the same error, I will give it a try and eliminate it.

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #14

      @AxelVienna said in Qt Creator not compiling on Windows 10:

      It is set in the project settings for the compile kit under “additional commands”.

      Why? Why do you think when you enter something there QtCreator magically knows that it should be a define and be prefixed with '-DWINDOWS'?
      No need for such a define at all - WIN32 is defined by default with every windows compiler.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • AxelViennaA AxelVienna

        Dear community,
        I have a complex Qt Widgets project which compiles just fine on a Linux environment. To get a Windows version, I installed Qt with MinGW from the online installer on a plain Windows 10 box. I copied the project tree, adapted .pro file source code for Windows specifics, installed all necessary libraries. I created a Windows/MinGW kit and tested if g++.exe works - it does.
        When I start compiling the project, qmake and MinGW-make finish correctly.
        g++, however, fails with "fatal error: no input files". This is where I get stuck. All sources and headers are in the project directory. I removed them from the .pro file and added them again with the "add existing file" function of Qt Creator in Windows. The .pro entries produced are identical to those in Linux. Most likely, I have made a stupid configuration mistake. I just can't find it. Help is highly appreciated.

        Compiler output:

        g++: error: WINDOWS -I../WhiteGUI -I. -I../../../Win64/include -I../
        WhiteEngine -I../WhiteEngine -I../WhiteEngine -I../WhiteEngine -IC:/Qt/6.1.2/
        mingw81_64/include -IC:/Qt/6.1.2/mingw81_64/include/QtQuickControls2 -IC:/Qt/
        6.1.2/mingw81_64/include/QtQuick -IC:/Qt/6.1.2/mingw81_64/include/QtOpenGL -
        IC:/Qt/6.1.2/mingw81_64/include/QtWidgets -IC:/Qt/6.1.2/mingw81_64/include/
        QtGui -IC:/Qt/6.1.2/mingw81_64/include/QtQmlModels -IC:/Qt/6.1.2/mingw81_64/
        include/QtQml -IC:/Qt/6.1.2/mingw81_64/include/QtNetwork -IC:/Qt/6.1.2/
        mingw81_64/include/QtCore -Idebug -I. -IC:/VulkanSDK/1.0.51.0/Include -IC:/Qt/
        6.1.2/mingw81_64/mkspecs/win32-g++  -o debug\whiteapi.o ..
        \WhiteEngine\whiteapi.cpp: No such file or directory
        g++: fatal error: no input files
        compilation terminated.```
        
        Here is my .pro file:
        QT += core gui
        QT += quickcontrols2
        
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
        
        CONFIG += c++11
        CONFIG += c++17
        
        WIN64 {
               INCLUDEPATH += ../../../Win64/include
               LIBS += -L ../../../Win64/libs -lcurl
               LIBS += -L ../../../Win64/libs -lcurl
               LIBS += -L ../../../Win64/libs -ljsoncpp
               LIBS += -lstdc++fs
               LIBS += -L ../../../Win64/libs -lboost_date_time
               LIBS += -L ../../../Win64/libs -lboost_system
               LIBS += -L ../../../Win64/libs -lQXlsx
        }else{
        
        LIBS += -lcurl
        LIBS += -L/usr/local/lib64 -ljsoncpp
        LIBS += -lstdc++fs
        LIBS += -lboost_date_time
        LIBS += -lboost_system
        LIBS += -L/usr/local/lib64/QXlsx -lQXlsx
        INCLUDEPATH += /usr/include/glibc-2.0
        INCLUDEPATH += /usr/local/include
        }
        # Compile defs for WhiteAPI class
        DEFINES -= WHITEAPI
        DEFINES += WHITEGUI
        
        RESOURCES +=resources.qrc \
            ../../../Frontend/BreezeStyleSheets-master/breeze.qrc
        
        # You can make your code fail to compile if it uses deprecated APIs.
        # In order to do so, uncomment the following line.
        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
        
        SOURCES += \
            ../WhiteEngine/whiteapi.cpp \
            ../WhiteEngine/whitedata.cpp \
            ../WhiteEngine/whitefile.cpp \
            ../WhiteEngine/whitejson.cpp \
            ../WhiteEngine/whitelog.cpp \
            ../WhiteEngine/whiterequest.cpp \
            ../WhiteEngine/whitestatus.cpp \
            ../WhiteEngine/whitetimer.cpp \
            ../WhiteEngine/whitetools.cpp \
            ../WhiteEngine/whitetranslator.cpp \
            ../WhiteEngine/apikey.cpp \
            apiwizard.cpp \
            detailam.cpp \
            detailar.cpp \
            detailrender.cpp \
            importfile.cpp \
            main.cpp \
            models.cpp \
            notyfier.cpp \
            whitebar.cpp \
            whiteclient.cpp \
            whiteconfig.cpp \
            whitegui.cpp \
            whitelogin.cpp \
            whitetimerpopup.cpp \
            whiteview.cpp
        
        HEADERS += \
            ../WhiteEngine/WhiteDefs.h \
            ../WhiteEngine/WhiteIncludes.h \
            ../WhiteEngine/apikey.h \
            ../WhiteEngine/whiteapi.h \
            ../WhiteEngine/whitedata.h \
            ../WhiteEngine/whitefile.h \
            ../WhiteEngine/whitejson.h \
            ../WhiteEngine/whitelog.h \
            ../WhiteEngine/whiterequest.h \
            ../WhiteEngine/whitestatus.h \
            ../WhiteEngine/whitetimer.h \
            ../WhiteEngine/whitetools.h \
            ../WhiteEngine/whitetranslator.h \
            apiwizard.h \
            detailam.h \
            detailar.h \
            detailrender.h \
            importfile.h \
            models.h \
            notyfier.h \
            whitebar.h \
            whiteclient.h \
            whiteconfig.h \
            whitegui.h \
            whitelogin.h \
            whitetimerpopup.h \
            whiteview.h
        
        FORMS += \
            apiwizard.ui \
            detailam.ui \
            detailar.ui \
            detailrender.ui \
            importfile.ui \
            models.ui \
            whiteconfig.ui \
            whitegui.ui \
            whitelogin.ui \
            whitetimerpopup.ui \
            whiteview.ui
        
        INCLUDEPATH += ../WhiteEngine
        
        # Default rules for deployment.
        qnx: target.path = /tmp/$${TARGET}/bin
        else: unix:!android: target.path = /opt/$${TARGET}/bin
        !isEmpty(target.path): INSTALLS += target
        
        
        FORMS += \
            APIKeyGUI.ui
        
        INCLUDEPATH += ../WhiteEngine
        
        # Default rules for deployment.
        qnx: target.path = /tmp/$${TARGET}/bin
        else: unix:!android: target.path = /opt/$${TARGET}/bin
        !isEmpty(target.path): INSTALLS += target
        
        DISTFILES +=
        
        
        FORMS += \
            APIKeyGUI.ui \
            models.ui
        
        INCLUDEPATH += ../WhiteEngine
        
        # Default rules for deployment.
        qnx: target.path = /tmp/$${TARGET}/bin
        else: unix:!android: target.path = /opt/$${TARGET}/bin
        !isEmpty(target.path): INSTALLS += target
        
        
        FORMS += \
            APIKeyGUI.ui
        
        INCLUDEPATH += ../WhiteEngine
        
        # Default rules for deployment.
        qnx: target.path = /tmp/$${TARGET}/bin
        else: unix:!android: target.path = /opt/$${TARGET}/bin
        !isEmpty(target.path): INSTALLS += target
        
        DISTFILES +=
        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @AxelVienna The title is misleading: you're not compiling QtCreator, you're compiling inside QtCreator.

        The actual error is: \WhiteEngine\whiteapi.cpp: No such file or directory
        So, does WhiteEngine folder exist one level up relative to the pro file?

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

        1 Reply Last reply
        4
        • AxelViennaA Offline
          AxelViennaA Offline
          AxelVienna
          wrote on last edited by
          #3

          Hi Jsulm,
          thanks for your swift reply -> yes it is.

          axel@jupiter:~> cd WhiteDolphin/WhiteDolphinV2/WhiteDolphin/WhiteGUI/
          axel@jupiter:~/WhiteDolphin/WhiteDolphinV2/WhiteDolphin/WhiteGUI> ll ../WhiteEngine/whiteapi.cpp
          -rw-r--r-- 1 axel users 16140 17. Jul 07:26 ../WhiteEngine/whiteapi.cpp
          axel@jupiter:~/WhiteDolphin/WhiteDolphinV2/WhiteDolphin/WhiteGUI> 
          
          

          Actually, all the files exist and my assumption is that the error message should lead me to another problem.

          C++ and Python walk into a bar. C++ reuses the first glass.

          1 Reply Last reply
          0
          • Christian EhrlicherC Online
            Christian EhrlicherC Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #4

            Your error is from Windows, your ls from Linux.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • AxelViennaA Offline
              AxelViennaA Offline
              AxelVienna
              wrote on last edited by
              #5

              You are right, Christian.
              Here is Windows:

              W:\>cd WhiteDolphin\WhiteDolphinV2\WhiteDolphin\WhiteGUI
              
              W:\WhiteDolphin\WhiteDolphinV2\WhiteDolphin\WhiteGUI>dir ..\WhiteEngine\whiteapi.cpp
               Datenträger in Laufwerk W: ist userhomes
               Volumeseriennummer: E7CE-5580
              
               Verzeichnis von W:\WhiteDolphin\WhiteDolphinV2\WhiteDolphin\WhiteEngine
              
              17.07.2021  07:26            16.140 whiteapi.cpp
                             1 Datei(en),         16.140 Bytes
                             0 Verzeichnis(se), 11.005.326.700.544 Bytes frei
              
              W:\WhiteDolphin\WhiteDolphinV2\WhiteDolphin\WhiteGUI>
              

              C++ and Python walk into a bar. C++ reuses the first glass.

              1 Reply Last reply
              0
              • Christian EhrlicherC Online
                Christian EhrlicherC Online
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #6

                And from where do you call make? Since your build dir is not your source dir I would guess it's wrong.
                Use absolute paths, use your code into the current dir or create a separate library with a separate pro file but don't use relative paths for sources.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                0
                • AxelViennaA Offline
                  AxelViennaA Offline
                  AxelVienna
                  wrote on last edited by
                  #7

                  Thanks Christian - good idea, done.
                  I have just copied the entire tree into a new directory and put all external sources (the ones with relative paths) into the project directory. I have removed the SOURCES and HEADERS section from the .pro file and added every file manually through the "add existing file" function.
                  The SOUCRES section reads as follows (HEADER section is identical except for .h instead of .cpp).

                  SOURCES += \
                      whiteapi.cpp \
                      whitedata.cpp \
                      whitefile.cpp \
                      whitejson.cpp \
                      whitelog.cpp \
                      whiterequest.cpp \
                      whitestatus.cpp \
                      whitetimer.cpp \
                      whitetools.cpp \
                      whitetranslator.cpp \
                      apikey.cpp \
                      apiwizard.cpp \
                      detailam.cpp \
                      detailar.cpp \
                      detailrender.cpp \
                      importfile.cpp \
                      main.cpp \
                      models.cpp \
                      notyfier.cpp \
                      whitebar.cpp \
                      whiteclient.cpp \
                      whiteconfig.cpp \
                      whitegui.cpp \
                      whitelogin.cpp \
                      whitetimerpopup.cpp \
                      whiteview.cpp
                  

                  Error message stays the same, save for absolute paths being used now.

                  g++: error: WINDOWS -IC:/Users/User/Documents/WhiteGUI -I. -I../../../Win64/include -I../WhiteEngine -I../WhiteEngine -I../WhiteEngine -I../WhiteEngine -IC:/Qt/6.1.2/mingw81_64/include -IC:/Qt/6.1.2/mingw81_64/include/QtQuickControls2 -IC:/Qt/6.1.2/mingw81_64/include/QtQuick -IC:/Qt/6.1.2/mingw81_64/include/QtOpenGL -IC:/Qt/6.1.2/mingw81_64/include/QtWidgets -IC:/Qt/6.1.2/mingw81_64/include/QtGui -IC:/Qt/6.1.2/mingw81_64/include/QtQmlModels -IC:/Qt/6.1.2/mingw81_64/include/QtQml -IC:/Qt/6.1.2/mingw81_64/include/QtNetwork -IC:/Qt/6.1.2/mingw81_64/include/QtCore -Idebug -I. -IC:/VulkanSDK/1.0.51.0/Include -IC:/Qt/6.1.2/mingw81_64/mkspecs/win32-g++  -o debug\whiteapi.o C:\Users\User\Documents\WhiteGUI\whiteapi.cpp: No such file or directory
                  g++: fatal error: no input files
                  compilation terminated.
                  

                  The message clearly seems misleading as the file claimed to be missing is actually existing:

                  C:\Users\User\Documents\WhiteGUI>dir whiteapi.cpp
                   Datenträger in Laufwerk C: ist Windows
                   Volumeseriennummer: B2A1-AA19
                  
                   Verzeichnis von C:\Users\User\Documents\WhiteGUI
                  
                  17.07.2021  07:26            16.140 whiteapi.cpp
                                 1 Datei(en),         16.140 Bytes
                                 0 Verzeichnis(se), 160.223.092.736 Bytes frei
                  
                  C:\Users\User\Documents\WhiteGUI>
                  

                  C++ and Python walk into a bar. C++ reuses the first glass.

                  JonBJ 1 Reply Last reply
                  0
                  • AxelViennaA AxelVienna

                    Thanks Christian - good idea, done.
                    I have just copied the entire tree into a new directory and put all external sources (the ones with relative paths) into the project directory. I have removed the SOURCES and HEADERS section from the .pro file and added every file manually through the "add existing file" function.
                    The SOUCRES section reads as follows (HEADER section is identical except for .h instead of .cpp).

                    SOURCES += \
                        whiteapi.cpp \
                        whitedata.cpp \
                        whitefile.cpp \
                        whitejson.cpp \
                        whitelog.cpp \
                        whiterequest.cpp \
                        whitestatus.cpp \
                        whitetimer.cpp \
                        whitetools.cpp \
                        whitetranslator.cpp \
                        apikey.cpp \
                        apiwizard.cpp \
                        detailam.cpp \
                        detailar.cpp \
                        detailrender.cpp \
                        importfile.cpp \
                        main.cpp \
                        models.cpp \
                        notyfier.cpp \
                        whitebar.cpp \
                        whiteclient.cpp \
                        whiteconfig.cpp \
                        whitegui.cpp \
                        whitelogin.cpp \
                        whitetimerpopup.cpp \
                        whiteview.cpp
                    

                    Error message stays the same, save for absolute paths being used now.

                    g++: error: WINDOWS -IC:/Users/User/Documents/WhiteGUI -I. -I../../../Win64/include -I../WhiteEngine -I../WhiteEngine -I../WhiteEngine -I../WhiteEngine -IC:/Qt/6.1.2/mingw81_64/include -IC:/Qt/6.1.2/mingw81_64/include/QtQuickControls2 -IC:/Qt/6.1.2/mingw81_64/include/QtQuick -IC:/Qt/6.1.2/mingw81_64/include/QtOpenGL -IC:/Qt/6.1.2/mingw81_64/include/QtWidgets -IC:/Qt/6.1.2/mingw81_64/include/QtGui -IC:/Qt/6.1.2/mingw81_64/include/QtQmlModels -IC:/Qt/6.1.2/mingw81_64/include/QtQml -IC:/Qt/6.1.2/mingw81_64/include/QtNetwork -IC:/Qt/6.1.2/mingw81_64/include/QtCore -Idebug -I. -IC:/VulkanSDK/1.0.51.0/Include -IC:/Qt/6.1.2/mingw81_64/mkspecs/win32-g++  -o debug\whiteapi.o C:\Users\User\Documents\WhiteGUI\whiteapi.cpp: No such file or directory
                    g++: fatal error: no input files
                    compilation terminated.
                    

                    The message clearly seems misleading as the file claimed to be missing is actually existing:

                    C:\Users\User\Documents\WhiteGUI>dir whiteapi.cpp
                     Datenträger in Laufwerk C: ist Windows
                     Volumeseriennummer: B2A1-AA19
                    
                     Verzeichnis von C:\Users\User\Documents\WhiteGUI
                    
                    17.07.2021  07:26            16.140 whiteapi.cpp
                                   1 Datei(en),         16.140 Bytes
                                   0 Verzeichnis(se), 160.223.092.736 Bytes frei
                    
                    C:\Users\User\Documents\WhiteGUI>
                    
                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by JonB
                    #8

                    @AxelVienna
                    I could be wrong, but I am not 100% convinced that error message is saying quite what you think it is, from the way it is written. (It actually looks to me as though the whole long command line is being passed/treated as naming one file...?)

                    Your error message starts:

                    g++: error: WINDOWS -IC:/Users/User/Documents/WhiteGUI ...
                    

                    Where is that plain word WINDOWS at the beginning coming from?

                    P.S.
                    If you open a Command Prompt and try, say,

                    gcc "WINDOWS -IC:/Users/User/Documents/WhiteGUI -o debug\whiteapi.o C:\Users\User\Documents\WhiteGUI\whiteapi.cpp"
                    

                    Note the quoting I have put in. How does the error message read for this? (Interested to see whether it echoes this whole line back with : No such file or directory at the end?)

                    1 Reply Last reply
                    3
                    • AxelViennaA Offline
                      AxelViennaA Offline
                      AxelVienna
                      wrote on last edited by
                      #9

                      WINDOWS results from a define in the build target.

                      DEFINES+=WINDOWS
                      

                      C++ and Python walk into a bar. C++ reuses the first glass.

                      JonBJ Christian EhrlicherC KroMignonK 3 Replies Last reply
                      0
                      • AxelViennaA AxelVienna

                        WINDOWS results from a define in the build target.

                        DEFINES+=WINDOWS
                        
                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by
                        #10

                        @AxelVienna
                        I don't know how that causes gcc WINDOWS ..., which does not look right to me....

                        In any case, I put in a P.S. for you to try, to see whether my suspicion is correct or mistaken?

                        1 Reply Last reply
                        0
                        • AxelViennaA AxelVienna

                          WINDOWS results from a define in the build target.

                          DEFINES+=WINDOWS
                          
                          Christian EhrlicherC Online
                          Christian EhrlicherC Online
                          Christian Ehrlicher
                          Lifetime Qt Champion
                          wrote on last edited by
                          #11

                          @AxelVienna said in Qt Creator not compiling on Windows 10:

                          DEFINES+=WINDOWS

                          This is not in your pro file you posted above

                          @JonB : good catch

                          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                          Visit the Qt Academy at https://academy.qt.io/catalog

                          1 Reply Last reply
                          1
                          • AxelViennaA Offline
                            AxelViennaA Offline
                            AxelVienna
                            wrote on last edited by
                            #12

                            You are right, it is not in the .pro file. It is set in the project settings for the compile kit under “additional commands”. I use that excessively to trigger conditional code for different targets.
                            As your suggested command line input delivers the same error, I will give it a try and eliminate it.

                            C++ and Python walk into a bar. C++ reuses the first glass.

                            Christian EhrlicherC 1 Reply Last reply
                            0
                            • AxelViennaA AxelVienna

                              WINDOWS results from a define in the build target.

                              DEFINES+=WINDOWS
                              
                              KroMignonK Offline
                              KroMignonK Offline
                              KroMignon
                              wrote on last edited by
                              #13

                              @AxelVienna said in Qt Creator not compiling on Windows 10:

                              WINDOWS results from a define in the build target.
                              DEFINES+=WINDOWS

                              I can not find this in the project file from your first post.
                              But in this project, you have included 3 times APIKeyGUI.ui in FORMS and added 4 times ../WhiteEngine in INCLUDEPATH.

                              Perhaps you should first cleanup the pro file and remove redundant informations?

                              It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                              1 Reply Last reply
                              0
                              • AxelViennaA AxelVienna

                                You are right, it is not in the .pro file. It is set in the project settings for the compile kit under “additional commands”. I use that excessively to trigger conditional code for different targets.
                                As your suggested command line input delivers the same error, I will give it a try and eliminate it.

                                Christian EhrlicherC Online
                                Christian EhrlicherC Online
                                Christian Ehrlicher
                                Lifetime Qt Champion
                                wrote on last edited by
                                #14

                                @AxelVienna said in Qt Creator not compiling on Windows 10:

                                It is set in the project settings for the compile kit under “additional commands”.

                                Why? Why do you think when you enter something there QtCreator magically knows that it should be a define and be prefixed with '-DWINDOWS'?
                                No need for such a define at all - WIN32 is defined by default with every windows compiler.

                                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                Visit the Qt Academy at https://academy.qt.io/catalog

                                1 Reply Last reply
                                2
                                • AxelViennaA Offline
                                  AxelViennaA Offline
                                  AxelVienna
                                  wrote on last edited by
                                  #15

                                  Well, as I said in the very beginning: Most likely, I have made a stupid configuration mistake.
                                  Thanks to all for pointing me to the right spot.

                                  C++ and Python walk into a bar. C++ reuses the first glass.

                                  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