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. Error: Compiling legacy Souce code
Forum Updated to NodeBB v4.3 + New Features

Error: Compiling legacy Souce code

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
44 Posts 6 Posters 10.9k 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.
  • jsulmJ jsulm

    @robrob said in Error: Compiling legacy Souce code:

    I tried to compile the qwt with Qt Creator

    You don't compile with QtCreator, QtCreator is an IDE not a compiler. You need to make sure your environment is set up correctly (compiler, Qt).

    R Offline
    R Offline
    robrob
    wrote on last edited by
    #35

    Hi Jsulm,
    When I say compile, I mean build.

    K 1 Reply Last reply
    0
    • R robrob

      Hi Jsulm,
      When I say compile, I mean build.

      K Offline
      K Offline
      koahnig
      wrote on last edited by koahnig
      #36

      @robrob

      What we are trying to tell you is that Qt creator is an IDE (Integrated Deveopment Environment). This is basically an editor with the capability to launch other programs.

      When you are making a build through creator it is nothing else than opening command line on windows and calling qmake for the specific pre-build you have chosen. When you have 10 different Qt lib versions on your PC, you have 10 different tool chains with 10 associated qmakes. Therefore, you can change in between the tool chain and compile (build) with different compilers and Qt libs.

      qmake accesses some setup configuration files indicating what the compiler used for the build was and therefore, it will use the appropriate compiler.

      Qt header files are part of Qt libs and go along with them. The same for QWT, also moc and other stuff. There is apparently an issue with the setup of your Qt libraries and teh associated tools. Changing to older versions of Qt creator does little if nothing change.

      Vote the answer(s) that helped you to solve your issue(s)

      R 1 Reply Last reply
      2
      • K koahnig

        @robrob

        What we are trying to tell you is that Qt creator is an IDE (Integrated Deveopment Environment). This is basically an editor with the capability to launch other programs.

        When you are making a build through creator it is nothing else than opening command line on windows and calling qmake for the specific pre-build you have chosen. When you have 10 different Qt lib versions on your PC, you have 10 different tool chains with 10 associated qmakes. Therefore, you can change in between the tool chain and compile (build) with different compilers and Qt libs.

        qmake accesses some setup configuration files indicating what the compiler used for the build was and therefore, it will use the appropriate compiler.

        Qt header files are part of Qt libs and go along with them. The same for QWT, also moc and other stuff. There is apparently an issue with the setup of your Qt libraries and teh associated tools. Changing to older versions of Qt creator does little if nothing change.

        R Offline
        R Offline
        robrob
        wrote on last edited by
        #37

        @koahnig
        What we are trying to tell you is that Qt creator is an IDE (Integrated Deveopment Environment).
        Ok, I see. I knew that bit.
        Most of the time I use the IDE to build the project because it is more convinent. For example Microsoft Visual Studio.
        I am not familiar with using the compiler directlty. I found it hard to set the compiler parameters. This transparent when I use IDE.
        Is it easy to use the compiler and the linker directly ?

        K jsulmJ 2 Replies Last reply
        0
        • R robrob

          @koahnig
          What we are trying to tell you is that Qt creator is an IDE (Integrated Deveopment Environment).
          Ok, I see. I knew that bit.
          Most of the time I use the IDE to build the project because it is more convinent. For example Microsoft Visual Studio.
          I am not familiar with using the compiler directlty. I found it hard to set the compiler parameters. This transparent when I use IDE.
          Is it easy to use the compiler and the linker directly ?

          K Offline
          K Offline
          koahnig
          wrote on last edited by
          #38

          @robrob

          It is not so hard. However, I have not done in real work for a long time.

          When you have followed instructions to build QWT, you are calling qmake that is already the lowest you should get.

          Using Qt creator helps to set up parameters and that is the best you can do. Especially when you do not want to bother about the details. This all shall make the work easier. You basically have a couple of different layers, which can be called independently, but all requires a special syntax.

          The IDE is helping to organize all, but that's it. Standard headers are part of the compiler as it has always been and always will be. Qt headers are part of Qt. QWT header are part of QWT.

          So all this are different tools. Only some stupid examples.
          When you are trying to eat a steak, but you have only a spoon, you typically got a significant problem. It does not matter when you have the spoon in the right or left hand. A fork and a steak knife are the proper tools and typically some conventions how to use.
          When you are changing Qt creator versions it is similar to change the spoon from left to right hand.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • R robrob

            @koahnig
            What we are trying to tell you is that Qt creator is an IDE (Integrated Deveopment Environment).
            Ok, I see. I knew that bit.
            Most of the time I use the IDE to build the project because it is more convinent. For example Microsoft Visual Studio.
            I am not familiar with using the compiler directlty. I found it hard to set the compiler parameters. This transparent when I use IDE.
            Is it easy to use the compiler and the linker directly ?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #39

            @robrob You don't need to call the compiler directly. If it is a qmake based project you simply do:

            cd PATH_TO_QWT
            qmake
            make
            make install
            

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

            R 1 Reply Last reply
            2
            • jsulmJ jsulm

              @robrob You don't need to call the compiler directly. If it is a qmake based project you simply do:

              cd PATH_TO_QWT
              qmake
              make
              make install
              
              R Offline
              R Offline
              robrob
              wrote on last edited by
              #40

              cd PATH_TO_QWT
              qmake
              make
              make install*

              I tried that but it didn't work then I tried Qt Creator 2.4.1 and it did build and generate the lib folder with its *.dll library.

              If it is a qmake based project

              How can you tell if it is qmake project or other project?
              Is qmake a compiler and Mingw32-make a linker?
              I can see that the creator call qmake first then call ming32-make and at the end the . exe is generated.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                robrob
                wrote on last edited by
                #41

                I would like to thank every one who helped me here . your information was very valuable.
                Now I managed to compile the source without error. I can also debug and run the software.
                There is a tiny issue :
                debug folder has a .exe file.
                release folder is empty (no .exe)
                I can't publish the application. A message say:"you can publish at the moment".

                1 Reply Last reply
                0
                • VRoninV Offline
                  VRoninV Offline
                  VRonin
                  wrote on last edited by
                  #42

                  force a release build, call make release instead of just make

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  R 1 Reply Last reply
                  1
                  • VRoninV VRonin

                    force a release build, call make release instead of just make

                    R Offline
                    R Offline
                    robrob
                    wrote on last edited by
                    #43

                    @VRonin said in Error: Compiling legacy Souce code:

                    force a release build, call make release instead of just make

                    How do you that within Qt Creator ?
                    I can see :
                    It call qmake :
                    15:22:32: Starting: "c:\qt\4.7.4\bin\qmake.exe" "C:\Users\rabmerab\Documents\Qt projects\SA430.Gui1\V2.0\Src\SA430Gui.pro" -r -spec win32-g++ "QMLJSDEBUGGER_PATH=C:/Qt/4.7.4/qtc-qmldbg".

                    then it call ming32-make

                    15:23:49: Starting: "C:\Qt\qtcreator-2.4.1\mingw\bin\mingw32-make.exe"
                    C:/Qt/qtcreator-2.4.1/mingw/bin/mingw32-make.exe -f Makefile.Debug

                    R 1 Reply Last reply
                    0
                    • R robrob

                      @VRonin said in Error: Compiling legacy Souce code:

                      force a release build, call make release instead of just make

                      How do you that within Qt Creator ?
                      I can see :
                      It call qmake :
                      15:22:32: Starting: "c:\qt\4.7.4\bin\qmake.exe" "C:\Users\rabmerab\Documents\Qt projects\SA430.Gui1\V2.0\Src\SA430Gui.pro" -r -spec win32-g++ "QMLJSDEBUGGER_PATH=C:/Qt/4.7.4/qtc-qmldbg".

                      then it call ming32-make

                      15:23:49: Starting: "C:\Qt\qtcreator-2.4.1\mingw\bin\mingw32-make.exe"
                      C:/Qt/qtcreator-2.4.1/mingw/bin/mingw32-make.exe -f Makefile.Debug

                      R Offline
                      R Offline
                      robrob
                      wrote on last edited by
                      #44

                      @robrob
                      After a bit of head scratching, I found how to force the Qt Creator to generate .exe in the release folder.
                      The confusion was in the project setting when once your open the project; default setting was : one for debug and one for release. This made believe that, it will generate both debug folder and release folder when I press Build button.
                      I did see both folder created but only debug folder was filled with files.
                      However, the IDE Gui, there another button where you can select between debug and release function.
                      Selecting Release function resolve the issue.
                      Now this thread is RESOLVED,

                      1 Reply Last reply
                      1

                      • Login

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