February 18, 2013

gpazo gpazo
Lab Rat
13 posts

error building Qt 4.8.0 windows 7 minGW

 

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-make3: ***[..\..\..\..\..\..\..\imports\QtWebKit\qmlwebkitplugind.dll] Error 1

Any help is greatly appreciated, thanks!

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

6 replies

February 19, 2013

koahnig koahnig
Mad Scientist
2112 posts

welcome to devnet

Did you see and follow this [qt-project.org] 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.

February 20, 2013

gpazo gpazo
Lab Rat
13 posts

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

February 20, 2013

koahnig koahnig
Mad Scientist
2112 posts

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.

February 26, 2013

gpazo gpazo
Lab Rat
13 posts

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.

March 21, 2013

Ethicius Ethicius
Lab Rat
4 posts

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.

April 17, 2013

Chris Kawa Chris Kawa
Robot Herder
368 posts

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
 
  ‹‹ Recompile 5.0.1 static      std::to_string() not found in standard library ››

You must log in to post a reply. Not a member yet? Register here!