Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Run a working project on a new Computer
Forum Updated to NodeBB v4.3 + New Features

Run a working project on a new Computer

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 2 Posters 861 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.
  • aha_1980A aha_1980

    Hi @DavidM29,

    It seems you installed way more Qt versions than needed. I'd recommend uninstalling the ones you don't wanne use to avoid confusion.

    The selected MinGW kit looks good at first sight.

    Which Qt version did you use before?

    Have you completely removed all build artifacts and the .pro.user before opening the project?

    I do have a main :

    Yeah, but the error is:

    crt0_c.c:-1: error : undefined reference to `WinMain@16

    WinMain is the function that calls your main.

    If the error still persists after carefully cleaning all build artifacts, can you show a build log for a full compile?

    Regards

    D Offline
    D Offline
    DavidM29
    wrote on last edited by DavidM29
    #3

    @aha_1980
    I installed the complete package when I installed Qt so that is probably the reason why I do have as many kits.
    How can I uninstall them ? Should I do it manually ? I never know which one should I used and if it is supposed to make any difference to be honest ...
    EDIT : I found out with the Maintenance tool.

    I used Qt 5.10. on my previous computer, now it is 5.13 (latest version)

    But why would it be looking for a WinMain ? I've never used WinMain before !

    I do not have anymore build artifacts and .pro.user has been removed.

    The complete Compile output :
    03508b1f-2123-4633-82b1-a47daf9dab74-image.png
    bd42fc7e-1c0c-4077-90f8-b15ddc55432e-image.png
    a719577d-5a32-4139-b13d-7ad7ebbebffe-image.png
    8440b98a-f968-43ad-a900-62d64d2e045a-image.png
    95f95949-ae05-4fbe-8a80-bbadf130d36d-image.png

    (Sorry for the image format but don't know how to share it an other way... Too many character for a single post...)

    aha_1980A 1 Reply Last reply
    0
    • D DavidM29

      @aha_1980
      I installed the complete package when I installed Qt so that is probably the reason why I do have as many kits.
      How can I uninstall them ? Should I do it manually ? I never know which one should I used and if it is supposed to make any difference to be honest ...
      EDIT : I found out with the Maintenance tool.

      I used Qt 5.10. on my previous computer, now it is 5.13 (latest version)

      But why would it be looking for a WinMain ? I've never used WinMain before !

      I do not have anymore build artifacts and .pro.user has been removed.

      The complete Compile output :
      03508b1f-2123-4633-82b1-a47daf9dab74-image.png
      bd42fc7e-1c0c-4077-90f8-b15ddc55432e-image.png
      a719577d-5a32-4139-b13d-7ad7ebbebffe-image.png
      8440b98a-f968-43ad-a900-62d64d2e045a-image.png
      95f95949-ae05-4fbe-8a80-bbadf130d36d-image.png

      (Sorry for the image format but don't know how to share it an other way... Too many character for a single post...)

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @DavidM29

      you can upload such logs into paste services.

      One strong advice: Don't use project directories with spaces or special charactes in it. That may be no problem here, but will sooner or later hit you somewhere else.

      Regarding the problem: do you have a libmingw32.a? The path to this file looks extremely long and odd.

      Can you compile a minimal example from the wizards?

      Regards

      Qt has to stay free or it will die.

      D 1 Reply Last reply
      1
      • aha_1980A aha_1980

        @DavidM29

        you can upload such logs into paste services.

        One strong advice: Don't use project directories with spaces or special charactes in it. That may be no problem here, but will sooner or later hit you somewhere else.

        Regarding the problem: do you have a libmingw32.a? The path to this file looks extremely long and odd.

        Can you compile a minimal example from the wizards?

        Regards

        D Offline
        D Offline
        DavidM29
        wrote on last edited by
        #5

        @aha_1980
        Ok I clearly have some lacks...
        What is "paste services" ?

        I'll change the name of the project then, that is true that special characters and spaces are usually source of problems.

        What do you mean by "compile a minimal exemple" ? Create a new "Hello world" project and compile it for exemple ?

        aha_1980A 1 Reply Last reply
        0
        • D DavidM29

          @aha_1980
          Ok I clearly have some lacks...
          What is "paste services" ?

          I'll change the name of the project then, that is true that special characters and spaces are usually source of problems.

          What do you mean by "compile a minimal exemple" ? Create a new "Hello world" project and compile it for exemple ?

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #6

          @DavidM29

          What is "paste services" ?

          E.g. https://pastebin.com/

          What do you mean by "compile a minimal exemple" ? Create a new "Hello world" project and compile it for exemple ?

          Exactly.

          Regards

          Qt has to stay free or it will die.

          D 1 Reply Last reply
          1
          • aha_1980A aha_1980

            @DavidM29

            What is "paste services" ?

            E.g. https://pastebin.com/

            What do you mean by "compile a minimal exemple" ? Create a new "Hello world" project and compile it for exemple ?

            Exactly.

            Regards

            D Offline
            D Offline
            DavidM29
            wrote on last edited by
            #7

            @aha_1980
            Ok thanks, I've never used this before...

            So, I've made a project named Test that is basicly a Qt Quick project made with the wizard.
            Here is the output :

            10:20:35: Running steps for project Test...
            10:20:35: Configuration unchanged, skipping qmake step.
            10:20:35: Starting: "C:\Qt\Qt5.13.0\Tools\mingw730_32\bin\mingw32-make.exe" -j8
            C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/mingw32-make -f Makefile.Debug
            mingw32-make[1]: Entering directory 'C:/Users/dm/Documents/build-Test-Desktop_Qt_5_13_0_MinGW_32_bit-Debug'
            mingw32-make[1]: Nothing to be done for 'first'.
            mingw32-make[1]: Leaving directory 'C:/Users/dm/Documents/build-Test-Desktop_Qt_5_13_0_MinGW_32_bit-Debug'
            10:20:37: The process "C:\Qt\Qt5.13.0\Tools\mingw730_32\bin\mingw32-make.exe" exited normally.
            10:20:37: Elapsed time: 00:02.
            

            But then I re-compiled my previous project and the compile output was shorter but with the same error.
            Here it is :

            10:22:55: Running steps for project SimulateurTonne...
            10:22:55: Configuration unchanged, skipping qmake step.
            10:22:55: Starting: "C:\Qt\Qt5.13.0\Tools\mingw730_32\bin\mingw32-make.exe" -j8
            cd app\ && ( if not exist Makefile C:\Qt\Qt5.13.0\5.13.0\mingw73_32\bin\qmake.exe -o Makefile "C:\Users\dm\Documents\Projets Qt\SimulateurTonne\app\app.pro" -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" ) && C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/mingw32-make -f Makefile 
            cd tests\ && ( if not exist Makefile C:\Qt\Qt5.13.0\5.13.0\mingw73_32\bin\qmake.exe -o Makefile "C:\Users\dm\Documents\Projets Qt\SimulateurTonne\tests\tests.pro" -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" ) && C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/mingw32-make -f Makefile 
            mingw32-make[1]: Entering directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/tests'
            C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/mingw32-make -f Makefile.Debug
            mingw32-make[1]: Entering directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/app'
            C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/mingw32-make -f Makefile.Debug
            mingw32-make[2]: Entering directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/tests'
            g++ -Wl,-subsystem,console -mthreads -o debug\tests.exe debug/calculs.o debug/moc_calculs.o  C:\Qt\Qt5.13.0\5.13.0\mingw73_32\lib\libQt5Testd.a C:\Qt\Qt5.13.0\5.13.0\mingw73_32\lib\libQt5Cored.a   
            C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
            collect2.exe: error: ld returned 1 exit status
            mingw32-make[2]: *** [Makefile.Debug:66: debug/tests.exe] Error 1
            mingw32-make[1]: *** [Makefile:38: debug] Error 2
            mingw32-make[2]: Leaving directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/tests'
            mingw32-make[1]: Leaving directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/tests'
            mingw32-make: *** [Makefile:69: sub-tests-make_first] Error 2
            mingw32-make: *** Waiting for unfinished jobs....
            mingw32-make[2]: Entering directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/app'
            mingw32-make[2]: Nothing to be done for 'first'.
            mingw32-make[2]: Leaving directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/app'
            mingw32-make[1]: Leaving directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/app'
            10:22:58: The process "C:\Qt\Qt5.13.0\Tools\mingw730_32\bin\mingw32-make.exe" exited with code 2.
            Error while building/deploying project SimulateurTonne (kit: Desktop Qt 5.13.0 MinGW 32-bit)
            When executing step "Make"
            10:22:58: Elapsed time: 00:03.
            
            aha_1980A 1 Reply Last reply
            0
            • D DavidM29

              @aha_1980
              Ok thanks, I've never used this before...

              So, I've made a project named Test that is basicly a Qt Quick project made with the wizard.
              Here is the output :

              10:20:35: Running steps for project Test...
              10:20:35: Configuration unchanged, skipping qmake step.
              10:20:35: Starting: "C:\Qt\Qt5.13.0\Tools\mingw730_32\bin\mingw32-make.exe" -j8
              C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/mingw32-make -f Makefile.Debug
              mingw32-make[1]: Entering directory 'C:/Users/dm/Documents/build-Test-Desktop_Qt_5_13_0_MinGW_32_bit-Debug'
              mingw32-make[1]: Nothing to be done for 'first'.
              mingw32-make[1]: Leaving directory 'C:/Users/dm/Documents/build-Test-Desktop_Qt_5_13_0_MinGW_32_bit-Debug'
              10:20:37: The process "C:\Qt\Qt5.13.0\Tools\mingw730_32\bin\mingw32-make.exe" exited normally.
              10:20:37: Elapsed time: 00:02.
              

              But then I re-compiled my previous project and the compile output was shorter but with the same error.
              Here it is :

              10:22:55: Running steps for project SimulateurTonne...
              10:22:55: Configuration unchanged, skipping qmake step.
              10:22:55: Starting: "C:\Qt\Qt5.13.0\Tools\mingw730_32\bin\mingw32-make.exe" -j8
              cd app\ && ( if not exist Makefile C:\Qt\Qt5.13.0\5.13.0\mingw73_32\bin\qmake.exe -o Makefile "C:\Users\dm\Documents\Projets Qt\SimulateurTonne\app\app.pro" -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" ) && C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/mingw32-make -f Makefile 
              cd tests\ && ( if not exist Makefile C:\Qt\Qt5.13.0\5.13.0\mingw73_32\bin\qmake.exe -o Makefile "C:\Users\dm\Documents\Projets Qt\SimulateurTonne\tests\tests.pro" -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" ) && C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/mingw32-make -f Makefile 
              mingw32-make[1]: Entering directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/tests'
              C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/mingw32-make -f Makefile.Debug
              mingw32-make[1]: Entering directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/app'
              C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/mingw32-make -f Makefile.Debug
              mingw32-make[2]: Entering directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/tests'
              g++ -Wl,-subsystem,console -mthreads -o debug\tests.exe debug/calculs.o debug/moc_calculs.o  C:\Qt\Qt5.13.0\5.13.0\mingw73_32\lib\libQt5Testd.a C:\Qt\Qt5.13.0\5.13.0\mingw73_32\lib\libQt5Cored.a   
              C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
              collect2.exe: error: ld returned 1 exit status
              mingw32-make[2]: *** [Makefile.Debug:66: debug/tests.exe] Error 1
              mingw32-make[1]: *** [Makefile:38: debug] Error 2
              mingw32-make[2]: Leaving directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/tests'
              mingw32-make[1]: Leaving directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/tests'
              mingw32-make: *** [Makefile:69: sub-tests-make_first] Error 2
              mingw32-make: *** Waiting for unfinished jobs....
              mingw32-make[2]: Entering directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/app'
              mingw32-make[2]: Nothing to be done for 'first'.
              mingw32-make[2]: Leaving directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/app'
              mingw32-make[1]: Leaving directory 'C:/Users/dm/Documents/Projets Qt/build-SimulateurTonne-Desktop_Qt_5_13_0_MinGW_32_bit-Debug/app'
              10:22:58: The process "C:\Qt\Qt5.13.0\Tools\mingw730_32\bin\mingw32-make.exe" exited with code 2.
              Error while building/deploying project SimulateurTonne (kit: Desktop Qt 5.13.0 MinGW 32-bit)
              When executing step "Make"
              10:22:58: Elapsed time: 00:03.
              
              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @DavidM29 can you show the .pro file for the specific target (it seems you have multiple targets in a SUBDIRS project?)

              Qt has to stay free or it will die.

              D 1 Reply Last reply
              0
              • aha_1980A aha_1980

                @DavidM29 can you show the .pro file for the specific target (it seems you have multiple targets in a SUBDIRS project?)

                D Offline
                D Offline
                DavidM29
                wrote on last edited by
                #9

                @aha_1980
                Yes I do have a "main" .pro which is this one
                Called with the name of my project :

                TEMPLATE = subdirs
                
                SUBDIRS += app tests \
                

                Then I do have my app repertory with the following app.pro :

                QT += quick
                CONFIG += c++11
                
                # The following define makes your compiler emit warnings if you use
                # any feature of Qt which as been marked 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 \
                    radialbar.cpp \
                    pressuremeter.cpp \
                    dpameter.cpp \
                    calculs.cpp \
                    context.cpp \
                    keyboardhelper.cpp \
                    vannemeter.cpp \
                    trans.cpp
                
                RESOURCES += qml.qrc \
                    image.qrc \
                    font.qrc
                
                # Additional import path used to resolve QML modules in Qt Creator's code model
                QML_IMPORT_PATH =
                
                # Additional import path used to resolve QML modules just for Qt Quick Designer
                QML_DESIGNER_IMPORT_PATH =
                
                # Default rules for deployment.
                qnx: target.path = /tmp/$${TARGET}/bin
                else: unix:!android: target.path = /opt/$${TARGET}/bin
                !isEmpty(target.path): INSTALLS += target
                
                HEADERS += \
                    radialbar.h \
                    pressuremeter.h \
                    dpameter.h \
                    calculs.h \
                    context.h \
                    keyboardhelper.h \
                    vannemeter.h \
                    trans.h
                
                DISTFILES += \
                    qmldir
                
                

                Then I do have unitary test in a folder called test with the test.pro attached :

                QT += quick
                
                CONFIG += c++11
                
                # The following define makes your compiler emit warnings if you use
                # any Qt feature that has been marked deprecated (the exact warnings
                # depend on your compiler). Refer to the documentation for the
                # deprecated API to know how to port your code away from it.
                DEFINES += QT_DEPRECATED_WARNINGS
                
                # You can also make your code fail to compile if it uses 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
                
                RESOURCES += qml.qrc
                
                # Additional import path used to resolve QML modules in Qt Creator's code model
                QML_IMPORT_PATH =
                
                # Additional import path used to resolve QML modules just for Qt Quick Designer
                QML_DESIGNER_IMPORT_PATH =
                
                # Default rules for deployment.
                qnx: target.path = /tmp/$${TARGET}/bin
                else: unix:!android: target.path = /opt/$${TARGET}/bin
                !isEmpty(target.path): INSTALLS += target
                
                
                aha_1980A 1 Reply Last reply
                0
                • D DavidM29

                  @aha_1980
                  Yes I do have a "main" .pro which is this one
                  Called with the name of my project :

                  TEMPLATE = subdirs
                  
                  SUBDIRS += app tests \
                  

                  Then I do have my app repertory with the following app.pro :

                  QT += quick
                  CONFIG += c++11
                  
                  # The following define makes your compiler emit warnings if you use
                  # any feature of Qt which as been marked 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 \
                      radialbar.cpp \
                      pressuremeter.cpp \
                      dpameter.cpp \
                      calculs.cpp \
                      context.cpp \
                      keyboardhelper.cpp \
                      vannemeter.cpp \
                      trans.cpp
                  
                  RESOURCES += qml.qrc \
                      image.qrc \
                      font.qrc
                  
                  # Additional import path used to resolve QML modules in Qt Creator's code model
                  QML_IMPORT_PATH =
                  
                  # Additional import path used to resolve QML modules just for Qt Quick Designer
                  QML_DESIGNER_IMPORT_PATH =
                  
                  # Default rules for deployment.
                  qnx: target.path = /tmp/$${TARGET}/bin
                  else: unix:!android: target.path = /opt/$${TARGET}/bin
                  !isEmpty(target.path): INSTALLS += target
                  
                  HEADERS += \
                      radialbar.h \
                      pressuremeter.h \
                      dpameter.h \
                      calculs.h \
                      context.h \
                      keyboardhelper.h \
                      vannemeter.h \
                      trans.h
                  
                  DISTFILES += \
                      qmldir
                  
                  

                  Then I do have unitary test in a folder called test with the test.pro attached :

                  QT += quick
                  
                  CONFIG += c++11
                  
                  # The following define makes your compiler emit warnings if you use
                  # any Qt feature that has been marked deprecated (the exact warnings
                  # depend on your compiler). Refer to the documentation for the
                  # deprecated API to know how to port your code away from it.
                  DEFINES += QT_DEPRECATED_WARNINGS
                  
                  # You can also make your code fail to compile if it uses 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
                  
                  RESOURCES += qml.qrc
                  
                  # Additional import path used to resolve QML modules in Qt Creator's code model
                  QML_IMPORT_PATH =
                  
                  # Additional import path used to resolve QML modules just for Qt Quick Designer
                  QML_DESIGNER_IMPORT_PATH =
                  
                  # Default rules for deployment.
                  qnx: target.path = /tmp/$${TARGET}/bin
                  else: unix:!android: target.path = /opt/$${TARGET}/bin
                  !isEmpty(target.path): INSTALLS += target
                  
                  
                  aha_1980A Offline
                  aha_1980A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  @DavidM29 just for clarification, it's the tests project that fails to link?

                  Qt has to stay free or it will die.

                  D 1 Reply Last reply
                  1
                  • aha_1980A aha_1980

                    @DavidM29 just for clarification, it's the tests project that fails to link?

                    D Offline
                    D Offline
                    DavidM29
                    wrote on last edited by DavidM29
                    #11

                    @aha_1980
                    No I'm trying to launch the app :
                    c62ad00b-2882-4dbc-9d98-f014a1e551fb-image.png

                    So I believe it is not trying to launch the test.pro

                    aha_1980A 1 Reply Last reply
                    0
                    • D DavidM29

                      @aha_1980
                      No I'm trying to launch the app :
                      c62ad00b-2882-4dbc-9d98-f014a1e551fb-image.png

                      So I believe it is not trying to launch the test.pro

                      aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @DavidM29

                      g++ -Wl,-subsystem,console -mthreads -o debug\tests.exe debug/calculs.o debug/moc_calculs.o C:\Qt\Qt5.13.0\5.13.0\mingw73_32\lib\libQt5Testd.a C:\Qt\Qt5.13.0\5.13.0\mingw73_32\lib\libQt5Cored.a
                      C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
                      collect2.exe: error: ld returned 1 exit status

                      debug\tests.exe <- Your tests?

                      Qt has to stay free or it will die.

                      D 1 Reply Last reply
                      1
                      • aha_1980A aha_1980

                        @DavidM29

                        g++ -Wl,-subsystem,console -mthreads -o debug\tests.exe debug/calculs.o debug/moc_calculs.o C:\Qt\Qt5.13.0\5.13.0\mingw73_32\lib\libQt5Testd.a C:\Qt\Qt5.13.0\5.13.0\mingw73_32\lib\libQt5Cored.a
                        C:/Qt/Qt5.13.0/Tools/mingw730_32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
                        collect2.exe: error: ld returned 1 exit status

                        debug\tests.exe <- Your tests?

                        D Offline
                        D Offline
                        DavidM29
                        wrote on last edited by DavidM29
                        #13

                        @aha_1980
                        Yes you are right...
                        It is my tests files.... Why does it try to run them ?

                        Edit : Indeed I try to remove the "tests" sub from my project .pro file and no the app is running...
                        But my tests used to work as well before ... But it is very good to know what make this error.

                        Edit 2 : I finally found my problem... I had a missing file in my test.pro ... Adding this missing file solve my problem.
                        I can keep my test and my app Launch properly !
                        Thanks a lot for you help !

                        aha_1980A 1 Reply Last reply
                        2
                        • D DavidM29

                          @aha_1980
                          Yes you are right...
                          It is my tests files.... Why does it try to run them ?

                          Edit : Indeed I try to remove the "tests" sub from my project .pro file and no the app is running...
                          But my tests used to work as well before ... But it is very good to know what make this error.

                          Edit 2 : I finally found my problem... I had a missing file in my test.pro ... Adding this missing file solve my problem.
                          I can keep my test and my app Launch properly !
                          Thanks a lot for you help !

                          aha_1980A Offline
                          aha_1980A Offline
                          aha_1980
                          Lifetime Qt Champion
                          wrote on last edited by
                          #14

                          Hi @DavidM29,

                          glad you could solve it! So please mark this topic as SOLVED too. Thanks!

                          Qt has to stay free or it will die.

                          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