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. Error while building project on windows 64 bit
Forum Updated to NodeBB v4.3 + New Features

Error while building project on windows 64 bit

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 3 Posters 2.1k Views 2 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.
  • R Offline
    R Offline
    rajeshgoswami2025
    wrote on 15 Apr 2017, 12:49 last edited by
    #1

    i am new in QT while running existing project getting error
    C:/Qt/Tools/mingw491_32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bin/ld.exe: cannot
    find -lqjson-qt5

    collect2.exe: error: ld returned 1 exit status

    i searched a lot but unable to fix this.
    quick response would help much more.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 15 Apr 2017, 17:12 last edited by
      #2

      Hi and welcome to devnet,

      Can you show your .pro file ?

      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
      • R Offline
        R Offline
        rajeshgoswami2025
        wrote on 18 Apr 2017, 11:54 last edited by
        #3

        sorry to report wrong error but the real bug is The process "QT_Set_Up\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2.

        this might be related to any project setup configuration . I have 5.5 version of qt library , qt creator version 4.2.1 and default compiler MINGW 4.9.2 .

        i am trying to build an existing QT project in creator , i do not know the previous configuration of set up . help me to fix it . I have a source code how i would be able to get know about previous configuration.

        J 1 Reply Last reply 18 Apr 2017, 12:04
        0
        • R rajeshgoswami2025
          18 Apr 2017, 11:54

          sorry to report wrong error but the real bug is The process "QT_Set_Up\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2.

          this might be related to any project setup configuration . I have 5.5 version of qt library , qt creator version 4.2.1 and default compiler MINGW 4.9.2 .

          i am trying to build an existing QT project in creator , i do not know the previous configuration of set up . help me to fix it . I have a source code how i would be able to get know about previous configuration.

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 18 Apr 2017, 12:04 last edited by
          #4

          @rajeshgoswami2025 said in Error while building project on windows 64 bit:

          QT_Set_Up\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2

          This is probably not the real error. The real error should be somewhere before that line. Can you show the whole build log?

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

          R 1 Reply Last reply 18 Apr 2017, 12:10
          0
          • J jsulm
            18 Apr 2017, 12:04

            @rajeshgoswami2025 said in Error while building project on windows 64 bit:

            QT_Set_Up\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2

            This is probably not the real error. The real error should be somewhere before that line. Can you show the whole build log?

            R Offline
            R Offline
            rajeshgoswami2025
            wrote on 18 Apr 2017, 12:10 last edited by
            #5

            @jsulm
            ./Workflow/xyz.h:365:37: error: 'MainPortionActive' is not a class or namespace
            enum MainPortionActive active = MainPortionActive::patient_info;
            ^
            ../Workflow/xyz.h:369:42: error: 'LeftPanelOption' is not a class or namespace
            enum LeftPanelOption leftActiveTab = LeftPanelOption::create_patient;
            ^
            Makefile.Debug:5366: recipe for target 'debug/main.o' failed
            mingw32-make[1]: Leaving directory '/build-abc-Desktop_Qt_5_5_1_MinGW_32bit-Debug'
            mingw32-make[1]: *** [debug/main.o] Error 1
            makefile:34: recipe for target 'debug' failed
            mingw32-make: *** [debug] Error 2

            these are the lines showing above that line.

            J 1 Reply Last reply 18 Apr 2017, 12:11
            0
            • R rajeshgoswami2025
              18 Apr 2017, 12:10

              @jsulm
              ./Workflow/xyz.h:365:37: error: 'MainPortionActive' is not a class or namespace
              enum MainPortionActive active = MainPortionActive::patient_info;
              ^
              ../Workflow/xyz.h:369:42: error: 'LeftPanelOption' is not a class or namespace
              enum LeftPanelOption leftActiveTab = LeftPanelOption::create_patient;
              ^
              Makefile.Debug:5366: recipe for target 'debug/main.o' failed
              mingw32-make[1]: Leaving directory '/build-abc-Desktop_Qt_5_5_1_MinGW_32bit-Debug'
              mingw32-make[1]: *** [debug/main.o] Error 1
              makefile:34: recipe for target 'debug' failed
              mingw32-make: *** [debug] Error 2

              these are the lines showing above that line.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 18 Apr 2017, 12:11 last edited by
              #6

              @rajeshgoswami2025 said in Error while building project on windows 64 bit:

              MainPortionActive

              MainPortionActive and LeftPanelOption are unknown where they are used. Did you forget to include header files where those types are declared?

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

              R 1 Reply Last reply 18 Apr 2017, 12:17
              0
              • J jsulm
                18 Apr 2017, 12:11

                @rajeshgoswami2025 said in Error while building project on windows 64 bit:

                MainPortionActive

                MainPortionActive and LeftPanelOption are unknown where they are used. Did you forget to include header files where those types are declared?

                R Offline
                R Offline
                rajeshgoswami2025
                wrote on 18 Apr 2017, 12:17 last edited by
                #7

                @jsulm No , same code is working on other machine on ubuntu but it is not able to compile on windows 64. I am new to QT and c++ also. No other change except than set up configuration.

                J 1 Reply Last reply 18 Apr 2017, 12:21
                0
                • R rajeshgoswami2025
                  18 Apr 2017, 12:17

                  @jsulm No , same code is working on other machine on ubuntu but it is not able to compile on windows 64. I am new to QT and c++ also. No other change except than set up configuration.

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 18 Apr 2017, 12:21 last edited by
                  #8

                  @rajeshgoswami2025 You should check Workflow/xyz.h - as the compiler tells you it does not know what MainPortionActive and LeftPanelOption are. I don't know why it works on Ubuntu - could be a different C++ compiler version.

                  One note: you are building your app as 32bit (this is fine even on Windows 64bit).

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

                  R 1 Reply Last reply 18 Apr 2017, 12:24
                  0
                  • J jsulm
                    18 Apr 2017, 12:21

                    @rajeshgoswami2025 You should check Workflow/xyz.h - as the compiler tells you it does not know what MainPortionActive and LeftPanelOption are. I don't know why it works on Ubuntu - could be a different C++ compiler version.

                    One note: you are building your app as 32bit (this is fine even on Windows 64bit).

                    R Offline
                    R Offline
                    rajeshgoswami2025
                    wrote on 18 Apr 2017, 12:24 last edited by
                    #9

                    @jsulm I can not change in existing working code , i can search for same compatible compiler for windows also . can u help me to know the existing configuration of QT project so that i would be able to set up same replica in my system as well.

                    J 1 Reply Last reply 18 Apr 2017, 12:28
                    0
                    • R rajeshgoswami2025
                      18 Apr 2017, 12:24

                      @jsulm I can not change in existing working code , i can search for same compatible compiler for windows also . can u help me to know the existing configuration of QT project so that i would be able to set up same replica in my system as well.

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 18 Apr 2017, 12:28 last edited by
                      #10

                      @rajeshgoswami2025 It would be actually better to try to find out why it doesn't build on Windows. Using another MinGW compiler can be tricky. What is the compiler version on Ubuntu and what is the MinGW version you're using? Are you building from a fresh source code without any build artefacts from Ubuntu?

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

                      R 1 Reply Last reply 18 Apr 2017, 12:35
                      0
                      • J jsulm
                        18 Apr 2017, 12:28

                        @rajeshgoswami2025 It would be actually better to try to find out why it doesn't build on Windows. Using another MinGW compiler can be tricky. What is the compiler version on Ubuntu and what is the MinGW version you're using? Are you building from a fresh source code without any build artefacts from Ubuntu?

                        R Offline
                        R Offline
                        rajeshgoswami2025
                        wrote on 18 Apr 2017, 12:35 last edited by
                        #11

                        @jsulm GCC version 5.7.0 64 bit is the compiler on Ubuntu, MinGW 4.9.2 32 bit compiler i am using and yes it is a fresh code.

                        J 1 Reply Last reply 18 Apr 2017, 12:41
                        0
                        • R rajeshgoswami2025
                          18 Apr 2017, 12:35

                          @jsulm GCC version 5.7.0 64 bit is the compiler on Ubuntu, MinGW 4.9.2 32 bit compiler i am using and yes it is a fresh code.

                          J Offline
                          J Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 18 Apr 2017, 12:41 last edited by
                          #12

                          @rajeshgoswami2025 My guess is that the code just doesn't compile with GCC 4.9.
                          You could try to use a newer MinGW, but probably you will need to rebuild Qt with that compiler.
                          As alternative you could use VC++ from Microsoft. You can install Visual Studio 2015 Community edition (don't forget to select C++ components during the set-up) for free (even for small commercial projects) and Qt for VC++2015. If you don't want the whole Visual Studio you can install just the build tools - I don't remember how Microsoft calls it, you can search for it.

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

                          1 Reply Last reply
                          1

                          1/12

                          15 Apr 2017, 12:49

                          • Login

                          • Login or register to search.
                          1 out of 12
                          • First post
                            1/12
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved