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. QtCreator vs cmd.exe (not equal)
Forum Updated to NodeBB v4.3 + New Features

QtCreator vs cmd.exe (not equal)

Scheduled Pinned Locked Moved General and Desktop
15 Posts 3 Posters 4.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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #4

    Hi and welcome to devnet,

    What errors are you getting now ?

    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
    • J Offline
      J Offline
      JustOneQuestion
      wrote on last edited by
      #5

      Thank you, SGaist , for your or attention.

      I have some identical errors in different parts of code: “undefined reference to” and “more undefined references to”
      For example:

      undefined reference to SomeOneFunc(_dictionary_*, char const*, int)' . more undefined references to SomeOneOtherFunc(dictionary, char const, int)' follow.

      This SomeOneFuncs are described in file1.c and file1.h and they have no deal with *.a. (I am not totally sure but looks like that is true. As I said before I am not author of this code.)
      Moreover there is exist one more error (last one)
      C:/ProgramFiles/QtMinGW/Tools/mingw491_32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bin/ld.exe: release/ FileMain.o: bad reloc address 0x14 in section `.text$ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8]'
      collect2.exe: error: ld returned 1 exit status
      mingw32-make[1]: *** [release\ProjectTest.exe] Error 1
      mingw32-make: *** [release] Error 2

      1 Reply Last reply
      0
      • sneubertS Offline
        sneubertS Offline
        sneubert
        wrote on last edited by
        #6

        The bad reloc address error you get, maybe caused by linking files compiled with different compilers.
        Do you build any part with a different compiler, or different version of gcc?
        Sometimes such errors are the result of having multiple mingw installation.
        You can compile from command line. Can you check the gcc dir with where g++?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JustOneQuestion
          wrote on last edited by
          #7

          When I compile from command line I use shortcut “Qt 5.4 for Desktop (MinGW 4.9 32 bit)” (from Start->Programs->Qt MinGW). This shortcut has properties (target object.. don’t sure how to translate it correct. But I suppose you know what I mean. ) This is one row
          C:\Windows\System32\cmd.exe /A /Q /K C:\ProgramFiles\QtMinGW\5.4\mingw491_32\bin\qtenv2.bat

          As I understand /A /Q /K is not important for compiler options. This is tenv2.bat file text: (4 rows)

          echo off
          echo Setting up environment for Qt usage...
          set PATH=C:\ProgramFiles\QtMinGW\5.4\mingw491_32\bin;C:\ProgramFiles\QtMinGW\Tools\mingw491_32\bin;%PATH%
          cd /D C:\ProgramFiles\QtMinGW\5.4\mingw491_32

          I don’t know how to check what QtCreator uses… Could you help me to know it?

          Moreover…When I saw first time Qt example I had OS Windows 8.1 and MS Visual Studio 2010 and I didn’t know what does g++ means. So I downloaded and installed Qt (5.4.1 MSVC 2010, 32bit) (qt-opensource-windows-x86-1.6.0-8-online, http://www.qt.io/download-open-source/). :) A bit later I had understood that it isn’t what I need :). After that I downloaded and installed http://sourceforge.net/projects/mingw/files/Installer/ mingw-get-setup.exe (86.5 kB) [with Basic Setup mingw-developer-tolkit mingw32-base mingw32-gcc-g++ msys-base]
          And the example works well with Windows cmd.exe without any bat-files or something else. But of course I set path to environment. After this I downloaded and installed Qt 5.4.1 for Windows 32-bit (MinGW 4.9.1, 856 MB) ( www.qt.io/download-open-source/ ). "G++..." command still works good from cmd.exe and g++ from previous installated MinGW (mingw-get-setup.exe).
          But I tried to delete path from environment for installed MinGW (mingw-get-setup.exe) and g++ stopped work with Windows cmd.exe But g++ command works with shortcut “Qt 5.4 for Desktop (MinGW 4.9 32 bit)”.
          Note: When I say “Windows cmd.exe ” I mean Start->Run->cmd.exe. Not shortcut with bat file and “path=…”. Moreover I don’t see in environment paths any folder for installed Qt 5.4.1 for Windows 32-bit (MinGW 4.9.1, 856 MB).
          I didn’t build compile etc *.a library from this example. And I haven't got source code for it or any information about how it had been created too.

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

            There's absolutely no need to install anything from MinGW since it comes as an option when you use the installer. Use that one. If you really want to do console development on Windows, then use the provided link to setup the console. Otherwise you'll have to do it by hand. Don't modify the PATH environment variable by hand, that's the shortest way to a world of trouble.

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

            J 1 Reply Last reply
            0
            • SGaistS SGaist

              There's absolutely no need to install anything from MinGW since it comes as an option when you use the installer. Use that one. If you really want to do console development on Windows, then use the provided link to setup the console. Otherwise you'll have to do it by hand. Don't modify the PATH environment variable by hand, that's the shortest way to a world of trouble.

              J Offline
              J Offline
              JustOneQuestion
              wrote on last edited by
              #9

              @SGaist said:

              There's absolutely no need to install anything from MinGW since it comes as an option when you use the installer. Use that one. If you really want to do console development on Windows, then use the provided link to setup the console. Otherwise you'll have to do it by hand. Don't modify the PATH environment variable by hand, that's the shortest way to a world of trouble.

              Ок. Thank you for advice. I understand. But what should I do now for create QtCreator project without errors? Should I uninstall all Qt and MinGW and reinstall then only Qt (MinGW version)?

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

                Since your install looks a bit messed up, yes, stat from clean

                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
                • J Offline
                  J Offline
                  JustOneQuestion
                  wrote on last edited by
                  #11

                  I have cleaned and reinstalled Qt. Moreover I installed Qt(MinGW) on other PC (without qt mingw etc before, but with MS VS2010).
                  In both case there are the same errors I have described.

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

                    The bad realloc error ? Or the kit error ?

                    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
                    • J Offline
                      J Offline
                      JustOneQuestion
                      wrote on last edited by JustOneQuestion
                      #13

                      @SGaist said:

                      The bad realloc error ? Or the kit error ?

                      Yes, realloc and undefined reference.
                      undefined reference to SomeOneFunc(dictionary, char const, int)' .
                      more undefined references to SomeOneOtherFunc(dictionary, char const, int)' follow.
                      and
                      ...bad reloc address 0x14 in section...
                      I said about it before. Nothing changed after reinstall. And I have the same errors on other PC too.

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

                        What symbols are missing ?

                        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
                        • J Offline
                          J Offline
                          JustOneQuestion
                          wrote on last edited by
                          #15

                          Thanks for advices.
                          I have found the solve at Russian Qt forum.
                          http://www.forum.crossplatform.ru/index.php?showtopic=10432
                          Thanks to them.
                          Problem can be solved by renaming all *.c file in project into *.cpp file.

                          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