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. Build QtCreator with Mingw - undefined references
Forum Updated to NodeBB v4.3 + New Features

Build QtCreator with Mingw - undefined references

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 2 Posters 6.5k 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.
  • rootshellR Offline
    rootshellR Offline
    rootshell
    wrote on last edited by
    #1

    Hello,

    I was hoping that someone would be kind enough to give me guidance as searching the forums and google did not seem to produce any real results...

    Downloaded QtCreator for windows and was doing great until I tried to make my own plugin, then I got the dreaded:

    Expected build key "Windows msvc release full-config" got "Windows mingw release full-config"

    A search told me that the cause is QtCreator was compiled with Visual Studio, and I would need to build QtCreator with Mingw. So I downloaded the source and followed the directions, the Mingw32-Make command spit out : undefined references

    Below is the command and the last few lines of the output.

    @
    C:\Qt\2010.05\qt\bin\qmake.exe C:\QtCreator\Source\qtcreator.pro
    C:\Qt\2010.05\mingw\bin\mingw32-make.exe

    ...serveral hundred lines of output later...

    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
    DQMLJS_BUILD_DIR -DQT_CREATOR -DIDE_LIBRARY_BASENAME="lib" -DWITH_TESTS -DQT_N
    O_CAST_TO_ASCII -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQMLJS_
    BUILD_DIR -DQT_DLL -DQT_TESTLIB_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPO
    RT -I"c:\Qt\2010.05\qt\include\QtCore" -I"c:\Qt\2010.05\qt\include\QtGui" -I"c:
    Qt\2010.05\qt\include\QtTest" -I"c:\Qt\2010.05\qt\include" -I"........\Source
    \src\libs" -I"c:\QtCreator\Source\tools" -I"........\Source\src\libs\qmljs\pa
    rser" -I"........\Source\src\libs" -I"c:\Qt\2010.05\qt\include\ActiveQt" -I"d
    ebug" -I"........\Source\src\libs\qmljs" -I"." -I"c:\Qt\2010.05\qt\mkspecs\de
    fault" -o debug\moc_qmljsicontextpane.o debug\moc_qmljsicontextpane.cpp
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    oc -shared -mthreads -Wl -Wl,--out-implib,c:\QtCreator\Build\lib\qtcreator\libQm
    lJSd.a -o ......\lib\qtcreator\QmlJSd.dll object_script.QmlJSd.Debug -L"c:\Qt
    \2010.05\qt\lib" -LC:/QtCreator/Build/lib/qtcreator -lUtilsd -lQtTestd4 -lQtGuid
    4 -lQtCored4
    Creating library file: c:\QtCreator\Build\lib\qtcreator\libQmlJSd.a
    ./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src
    /libs/qmljs/qmljsrewriter.cpp:131: undefined reference to _imp___ZN5Utils9Chang eSet7replaceEiiRK7QString' ./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src /libs/qmljs/qmljsrewriter.cpp:305: undefined reference to _imp___ZN5Utils9Chang
    eSet7replaceEiiRK7QString'
    ./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src
    /libs/qmljs/qmljsrewriter.cpp:346: undefined reference to _imp___ZN5Utils9Chang eSet7replaceEiiRK7QString' ./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src /libs/qmljs/qmljsrewriter.cpp:409: undefined reference to _imp___ZN5Utils9Chang
    eSet7replaceEiiRK7QString'
    ./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src
    /libs/qmljs/qmljsrewriter.cpp:561: undefined reference to _imp___ZN5Utils9Chang eSet7replaceEiiRK7QString' ./debug\qmljsrewriter.o:C:\QtCreator\Build\src\libs\qmljs/../../../../Source/src /libs/qmljs/qmljsrewriter.cpp:578: more undefined references to _imp___ZN5Utils
    9ChangeSet7replaceEiiRK7QString' follow
    collect2: ld returned 1 exit status
    mingw32-make[4]: *** [......\lib\qtcreator\QmlJSd.dll] Error 1
    mingw32-make[4]: Leaving directory C:/QtCreator/Build/src/libs/qmljs' mingw32-make[3]: *** [debug] Error 2 mingw32-make[3]: Leaving directory C:/QtCreator/Build/src/libs/qmljs'
    mingw32-make[2]: *** [sub-qmljs-make_default-ordered] Error 2
    mingw32-make[2]: Leaving directory C:/QtCreator/Build/src/libs' mingw32-make[1]: *** [sub-libs-make_default-ordered] Error 2 mingw32-make[1]: Leaving directory C:/QtCreator/Build/src'
    mingw32-make: *** [sub-src-make_default-ordered] Error 2

    @

    I am somewhat new to this, seems like it is having an issue linking, any ideas?

    As a side note, it would be awesome if QtCreator was built with Mingw so this process was seemless, or give us an option in the appliction to load all plugins regardless of what they were compiled with...but regardless I am very grateful to have QtCreator :)

    Certifications: CISSP, MCITP, MCSE, MCSA, BA, AA, AG, CST, CNST, Linux+, Security+, Server+, Network+, A+, iNet+

    Languages: C++, C#, VB, Python, Java

    1 Reply Last reply
    0
    • rootshellR Offline
      rootshellR Offline
      rootshell
      wrote on last edited by
      #2

      as a side note, I dual boot Kubuntu Linux and Windows 7 - this works great on linux (QtCreator was compiled with Mingw in linux) but for some reason it was compiled in visual studio for the windows distribution.

      Certifications: CISSP, MCITP, MCSE, MCSA, BA, AA, AG, CST, CNST, Linux+, Security+, Server+, Network+, A+, iNet+

      Languages: C++, C#, VB, Python, Java

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        How am I supposed to understand that last comment? Did you cross-compile Qt Creator for Windows on a Linux box?

        The Linux version of Qt Creator we ship is build with gcc, not mingw... that is why I am confused:-)

        1 Reply Last reply
        0
        • rootshellR Offline
          rootshellR Offline
          rootshell
          wrote on last edited by
          #4

          [quote author="Tobias Hunger" date="1298224767"]How am I supposed to understand that last comment? Did you cross-compile Qt Creator for Windows on a Linux box? The Linux version of Qt Creator we ship is build with gcc, not mingw... that is why I am confused:-) [/quote]

          Sorry let me clarify...

          I have a dual boot machine, Kubuntu Linux and Windows 7.

          In Linux downloaded from the repositories.
          In windows, I downloaded from the Qt web site.

          The windows version of Qt Creator was compiled with Visual Studio, but ships with Mingw. So when you attempt to create your own plugin, the plugin will not load with a message of:

          Expected build key “Windows msvc release full-config” got “Windows mingw release full-config”

          So I tried (on windows) to download the QtCreator source and compile with Mingw, but I am getting the errors mentioned in the original post.

          All I was saying is that custom plugins work perfectly in Linux because QtCreator was compiled with the same compiler, Windows however is compiled with VS, and QTCreator uses a different compiler, so plugins will not load.

          Is there a way to bypass the plugin signature checking without a compiling QtCreator? (Perhaps a argument or option I missed?)

          Certifications: CISSP, MCITP, MCSE, MCSA, BA, AA, AG, CST, CNST, Linux+, Security+, Server+, Network+, A+, iNet+

          Languages: C++, C#, VB, Python, Java

          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