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. Build exe-file of Qt4-Project
Forum Updated to NodeBB v4.3 + New Features

Build exe-file of Qt4-Project

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
37 Posts 5 Posters 11.5k Views 3 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.
  • M Offline
    M Offline
    magguz
    wrote on last edited by
    #10

    Hi,

    I tried now nmake of my Visual Studio 2017 installation. Therefore I run this command in the VS command prompt:

    configure -static -release -no-exceptions
    

    This works. It shows at the end: "Qt is now configured for building. Just run nmake."
    But when I run

    nmake sub-src
    

    after 20 minutes of compiling it shows an error:

    NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\cl.EXE"": Rückgabe-Code "0x2"
    Stop.
    NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86\nmake.exe"": Rückgabe-Code "0x2"
    Stop.
    NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
    Stop.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #11

      These are the finales lines that just state the compilation failed. Above these are those that are containing what is currently failing to build.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      1
      • SGaistS SGaist

        These are the finales lines that just state the compilation failed. Above these are those that are containing what is currently failing to build.

        M Offline
        M Offline
        magguz
        wrote on last edited by
        #12

        @SGaist said in Build exe-file of Qt4-Project:

        These are the finales lines that just state the compilation failed. Above these are those that are containing what is currently failing to build.

        There is something like this:

        C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cstdint(46): error C2039: "uintmax_t": Ist kein Element von "`global namespace'"
        C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cstdint(46): error C2873: "uintmax_t": Das Symbol kann nicht in einer using-Deklaration verwendet werden

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #13

          Ok... I didn't realised that you where using VS2017. The latest version of Visual Studio used to build Qt 4.8 was 2015. You will have to copy the 2015 mkspec and tweak it in order to build it.

          MinGW might be a quicker choice depending on your needs.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          M 1 Reply Last reply
          1
          • SGaistS SGaist

            Ok... I didn't realised that you where using VS2017. The latest version of Visual Studio used to build Qt 4.8 was 2015. You will have to copy the 2015 mkspec and tweak it in order to build it.

            MinGW might be a quicker choice depending on your needs.

            M Offline
            M Offline
            magguz
            wrote on last edited by
            #14

            @SGaist said in Build exe-file of Qt4-Project:

            Ok... I didn't realised that you where using VS2017. The latest version of Visual Studio used to build Qt 4.8 was 2015. You will have to copy the 2015 mkspec and tweak it in order to build it.

            MinGW might be a quicker choice depending on your needs.

            I will try to build it with Visual Studio 2015 tomorrow. Thanks for your hint.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              magguz
              wrote on last edited by
              #15

              I tried now to build it with Visual Studio 2015 but the same errors ocurr.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #16

                During which part of the build ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                M 1 Reply Last reply
                0
                • SGaistS SGaist

                  During which part of the build ?

                  M Offline
                  M Offline
                  magguz
                  wrote on last edited by
                  #17

                  @SGaist said in Build exe-file of Qt4-Project:

                  During which part of the build ?

                  during the compilation with nmake

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #18

                    So configure is successful ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    M 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      So configure is successful ?

                      M Offline
                      M Offline
                      magguz
                      wrote on last edited by
                      #19

                      @SGaist said in Build exe-file of Qt4-Project:

                      So configure is successful ?

                      yes

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #20

                        By the way, which version of 4.8 is it ?

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        M 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          By the way, which version of 4.8 is it ?

                          M Offline
                          M Offline
                          magguz
                          wrote on last edited by
                          #21

                          @SGaist said in Build exe-file of Qt4-Project:

                          By the way, which version of 4.8 is it ?

                          4.8.7

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by SGaist
                            #22

                            Did you check which mkspec gets selected when configuring Qt ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            M 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Did you check which mkspec gets selected when configuring Qt ?

                              M Offline
                              M Offline
                              magguz
                              wrote on last edited by
                              #23

                              @SGaist said in Build exe-file of Qt4-Project:

                              Did you check which mkpec gets selected when configuring Qt ?

                              no

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                magguz
                                wrote on last edited by
                                #24

                                I also tried it that way:

                                https://wiki.qt.io/How_to_build_a_static_Qt_version_for_Windows_with_gcc

                                But at the step where to modify the file qtenv.bat I don't find such a file in my Qt-folder.

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #25

                                  This one looks more recent.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  M 1 Reply Last reply
                                  0
                                  • SGaistS SGaist

                                    This one looks more recent.

                                    M Offline
                                    M Offline
                                    magguz
                                    wrote on last edited by
                                    #26

                                    @SGaist said in Build exe-file of Qt4-Project:

                                    This one looks more recent.

                                    This one also doesn't work.

                                    I tried now the tool windeployqt which comes with Qt5, but it seems to work only with Qt5-binaries. It would be enough if I could pack the exe file of my project with the necessary dlls in one folder so it runs on every Windows computer.

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by SGaist
                                      #27

                                      Then use Dependency Walker to get the dll used by your application and add the necessary plugin if any is needed and you should be good to go.

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        magguz
                                        wrote on last edited by
                                        #28

                                        The Dependency Walker doesn't work with my exe file. How can I determine instead the necessary dlls?

                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #29

                                          What do you mean by doesn't work ?

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - 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