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. Error building Qt 4.8.0 windows 7 minGW
Forum Updated to NodeBB v4.3 + New Features

Error building Qt 4.8.0 windows 7 minGW

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 6 Posters 10.2k 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.
  • G Offline
    G Offline
    gpazo
    wrote on last edited by
    #1

    I'm attempting to build Qt from source on windows 7 using the latest minGW compiler(4.6.2?) it gets pretty far along (about 3 hours compile time) before running into this ld.exe error:

    Configure options:
    -platform win32-g++-4.6 -opensource
    -debug -debug-and-release
    -no-phonon
    -fast
    -nomake examples
    -nomake demos
    -no-dsp
    -no-vcproj
    -no-cetest
    -no-s60
    -plugin-sql-psql -qt-zlib -qt-gif -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg
    -qt-sql-odbc -qt-sql-sqlite -plugin-sql-odbc -plugin-sql-sqlite
    -no-opengl -no-openvg -no-incredibuild-xge
    -qt-style-windowsxp

    c:/qt/mingw32_x86/mingw/bin/../lib/gcc/mingw32/4.6.2./../../../../mingw32/bin/ld.exe cannot find -lQtWebKitd
    collect2: ld returned 1 exit status
    mingw32-make[3]: ***[..............\imports\QtWebKit\qmlwebkitplugind.dll] Error 1

    Any help is greatly appreciated, thanks!

    Edit: source file = qt-everywhere-opensource-src-4.8.0.zip

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      welcome to devnet

      Did you "see and follow this":http://qt-project.org/wiki/Building_Qt_Desktop_for_Windows_with_MinGW guide?

      MinGW is not the latest version. Newest at the time 4.7.2. Personally I consider it a bit confusing when installing through the official MinGW page. If you do not update, you will install the older version 4.6.2. During installation you need to select update of db for the newer version. In addition you will get only the 32 bit version from there.
      In the above mentioned wiki-page you will find a reference to the recommended MinGW distro. This might make live a bit easier.
      In addition I would recommend to compile Qt 4.8.4.

      Following the information on the wiki page I could successfully compile Qt 4.8.4 with MinGW 4.7.2 (64 bit) on windows 7 64 bit.
      Hope this helps.

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

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gpazo
        wrote on last edited by
        #3

        I'm actually running into the same issue with minGW compiler bundled with qt 5.0.1 SDK and qt-everywhere-opensource-src-4.8.4.zip, using the same guide from above. I'm trying to compile Qt with postgresql support which I think may be the issue, any workarounds you know of?

        edit: full context of error below

        g++ -Wl, -s -mthreads -shared -Wl, --out-implib,c:\Qt\4.8.4-qt-x86-build\imports\QtWebKit\libqmlwebkitplugin.a -o ..............\imports\QtWebkit\qmlwebkitplugin.dll tmp/obj/release_shared/qdeclarativewebview.o tmp/obj/release_shared/plugin.o tmp/obj/release_shared/moc_qdeclarativewebview_p.o -L"c:\Qt\4.8.4-qt-x86-build\lib" -L"c:\Qt\4.8.4-qt-x86-build\lib" -LC:\Qt\PostgreSQL\lib -lQtDeclarative4 -lQtWebKit -lQtGui4 -lQtCore4
        c:/qt/mingw32_x86/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../..../i686-w64-mingw32/bin/ld.exe: cannot find -lQtWebKit
        collect2.exe: error: ld returned 1 exit status
        jom: C:\Qt\4.8.4-qt-x86-build\src\3rdparty\webkit\Source\WebKit\qt\declarative\Makefile.WebKit.Release [..............\imports\QtWebKit\qmlwebkitplugin.dll] Error 1
        jom: C:\Qt\4.8.4-qt-x86-build\src\3rdparty\webkit\Source\Webkit\qt\declarative\Makefile.WebKit [release-all] Error 2
        jom: C:\Qt\4.8.4-qt-x86-build\src\3rdparty\webkit\Source\Makefile.Webkit [sub-WebKit-qt-declartive-make_default-ordered] Error 2
        jom: C:\Qt\4.8.4-qt-x86-build\Makefile [sub-webkit-make_default-ordered] Error 2

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          Before I was posting before I had checked that I did not exclude QWebkit in my builds.

          Did you check if the lib is available?

          Since I did not build with postgresql support, i do not know if there is an issue.

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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gpazo
            wrote on last edited by
            #5

            Just posting back but I wasn't able to get around this using the minGW compiler. Although, I did successfully install qt using the 1.2.1 sdk and 4.8.1 sources to satisfy my needs, thanks again for the help.

            1 Reply Last reply
            0
            • E Offline
              E Offline
              Ethicius
              wrote on last edited by
              #6

              Your make most likely created QtWebKit4. Unfortunately, the Makefile is saying: include QtWebKit. Change the Makefiles manually and that should solve this particular problem. However, you might still not be able to compile the whole WebKit.

              1 Reply Last reply
              0
              • Chris KawaC Offline
                Chris KawaC Offline
                Chris Kawa
                Lifetime Qt Champion
                wrote on last edited by
                #7

                I've hit the same problem with the following config: Qt 4.8.4, MinGW 4.8.0 32bit, Windows 8.
                I got it to build with webkit though. As Ethicius said the problem is missing "4" in the Makefiles.

                • Go to the <build dir>\src\3rdparty\webkit\Source\WebKit\qt\declarative\
                • Depending on your configure options you'll have Makefile.WebKit.Release or Makefile.WebKit.Debug or both there.
                • Open them and find the line that starts with "LIBS =", should be near the top.
                • Change -lQtWebKit to -lQtWebKit4 (for release makefile) or -lQtWebKitd to -lQtWebKitd4 (for debug makefile)
                • Run jom or mingw32-make again, it should build now
                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Sigma
                  wrote on last edited by
                  #8

                  Hi,

                  I just got the same error:
                  x86_64-w64-mingw32/bin/ld.exe: cannot find -lQtWebKitd

                  I was being compiling Qt 4.8.4 in 64bits using the recommanded MinGW ( "http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/64-bit/threads-posix/seh/x64-4.8.0-release-posix-seh-rev2.7z/download":http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/64-bit/threads-posix/seh/x64-4.8.0-release-posix-seh-rev2.7z/download )

                  Refer to this page for more details about the recommanded MinGW:
                  "http://qt-project.org/wiki/MinGW-64-bit":http://qt-project.org/wiki/MinGW-64-bit

                  The solution of Chris Kawa worked for me.

                  @Chris Kawa: Maybe can you tell us why we have to do that? Where does the issue comes from?

                  @+

                  1 Reply Last reply
                  0
                  • Chris KawaC Offline
                    Chris KawaC Offline
                    Chris Kawa
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    My guess would be it's because there's a bug in the Qt buildsystem (duh...) ;)
                    I switched to Qt5 so I don't need it anymore, but maybe it's fixed in 4.8.5. Have you checked?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Sigma
                      wrote on last edited by
                      #10

                      [quote author="Chris Kawa" date="1379777936"]My guess would be it's because there's a bug in the Qt buildsystem (duh...) ;)
                      I switched to Qt5 so I don't need it anymore, but maybe it's fixed in 4.8.5. Have you checked?[/quote]

                      No i didn't check if the issue has been fixed. Your workaround works perfectly, so it doesn't matter if it has been fixed or not.

                      Thanks.

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        franku
                        wrote on last edited by
                        #11

                        Quite late reply, but I had the same problem with Qt 4.8.6. Patched qt_functions.prf:

                        @75c75
                        < win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d

                               win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d$${QT_MAJOR_VERSION}@
                        

                        and
                        @78c78
                        < isEmpty(LINKAGE):LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}

                           isEmpty(LINKAGE):LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}$${QT_MAJOR_VERSION} @
                        

                        This, Jen, is the internet.

                        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