PDA

View Full Version : Possible explanation for compiling Qt with WebKit problems with Visual Studio 2008



Boron
17th June 2009, 17:19
As many people already discovered, it seems to be impossible to compile the Qt library with WebKit when using the MS Visual Studio 2008 compiler.
Only running configure with -no-webkit let the compiler complete its work without error. This results in a Qt library without WebKit of course, but that is no problem if you don't need WebKit.

As I just read on the following page (http://webkit.org/building/tools.html) WebKit supports Visual Studio up to version 2005, but not newer versions.
So if you rely on WebKit and want to use VS 2008: Tough luck!

If anyone managed to compile Qt with WebKit and VS 2008 the solution would be most welcome here.

AcerExtensa
17th June 2009, 22:15
Hi! I have compiled qt 4.5.1 with WebKit on my Win 7 x64 machine with VS 2008.
Compilation breaks on WebKit, you need to compile WebKit separately(after error cd in webkit dir, nmake clean, nmake) after that start nmake in QTDIR again and it will do the job. I'll try this tomorrow on XP with VS 2008...

20thcb
19th June 2009, 04:47
I have successfully compiled Webkit on VS2008 with no issues using Qt 4.5.1. I just did the the standard default configure which includes all modules. Using Vista 32-bit SP1 and VS2008 Professional with SP1.

ufoxx
23rd June 2009, 10:38
Are we talking about the static library (.lib) or the dynamic (.dll)? It was no problem to get the DLL but impossible to create the .LIB in 2008.
I do not understand the difference between 2005 and 2008...This cannot be a problem of WebKit but of Microsoft. BTW does anyone know why the size of the WebKit.LIB is 1.3GB when creating with 2005? This is amazing, the DLL is only about 10MB...Could the size be the reason for 2008 to crash?

Boron
23rd June 2009, 23:55
Since the post of 20thcb I recompiled Qt 4.5.1 on different machines. All with Win XP SP3 and all with VS 2008 (some with SP1).
To confirm what ufoxx write: No chance to compile Qt as static lib with WebKit. But as dynamic lib everything works fine.

So this leads to the question:
Why can't Qt be compiled as static lib with WebKit? Is WebKit a plugin (plugins are known not to work in static Qt)?

ufoxx
29th June 2009, 15:37
Hi all,

I now have the reason why WebKit cannot be compiled as static lib in VS2008. I've been to the Microsoft Forums and asked the same question there. That's their reply:
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/b6a7ad57-49ef-4d9c-859f-494b919c8bf3
So it's up to MS to fix this memory problem or WebKit should configure their library to be a bit smaller. When I look at the QtGui4.lib: it's about 7MB as DLL and abou 88MB as LIB. Why is Webkit about 1.3GB as LIB and only 9.5 MB as DLL???? I think this relation is somehow wrong.
Has anyone created a static lib of WebKit4 smaller than 1GB?

AcerExtensa
30th June 2009, 08:53
on my x64 machine it breaks with 2,3GB lib size :)

Boron
2nd July 2009, 17:35
Yesterday I successfully compiled a static Qt 4.5.2 including WebKit. The QtWebKit.lib is about 267 MiB (QtWebKitd.lib is about 495MiB).
Something is different compared to Qt 4.5.1. I will download this again and verify.