April 13, 2011

Gourmand Gourmand
Lab Rat
154 posts

Cannot assemble static app with WebKit and Phonon

 

Once I solved problem with simple static application. But it doesn’t use Web or multimedia. Now I started new app using WebKit. Suddenly it requires Phonon (but I don’t use it in app at all). ld returns waterfall of errors like this:

  1.  i:/Qt/2010.05s/qtliblib/qt/lib/libWebKitd.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivatePhonon.cpp:(.text+0xb6): undefined reference to `_imp___ZN6Phonon11MediaObjectC1EP7QObject'

and so on…

I see libphonond.a and libphonon.a in qt/lib folder. What is wrong? What have I do to assemble application which just openes Web-page and downloads it first? Can I cut out Phonon references for this app?

8 replies

April 13, 2011

florent.revelut florent.reve..
Lab Rat
103 posts

Well, you can still recompile qt without phonon support (it’s a parameter on configure). Have you tried adding -lphonon to your linker ?

April 13, 2011

Gourmand Gourmand
Lab Rat
154 posts

Well, you can still recompile qt without phonon support (it’s a parameter on configure).

reconfigure Qt from beginning again? :o
Why it does not include Phonon automatically if WebKit depends from it????????????? Where it is written that I have configure Phonon if I need WebKit??????????????????????????????

but the Phonon library exists

Have you tried adding -lphonon to your linker ?

I used

  1. QT       += core gui webkit phonon

in .pro file

April 13, 2011

Volker Volker
Robot Herder
5428 posts

You will run into problems anyways, as static build of QtWebKit has been removed in Qt 4.7. See the following links for som details:

April 14, 2011

Gourmand Gourmand
Lab Rat
154 posts

static build of QtWebKit has been removed in Qt 4.7

Damn! Who was too smart to do that??? >:-E What if I’ll distribute static app on common GPL without “L”?

Problem with JS library can be worked around just by copying this lib to proper folder.

April 14, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

Perhaps you can add static build on yourself, it should be possible by changing some files :-)
Afai have seen, you followed this guide. [developer.qt.nokia.com] then webkit should be available as static lib, as it is changed in the web kit stuff.

can you post your pro file here?

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

April 14, 2011

Gourmand Gourmand
Lab Rat
154 posts

Now I rebuild Qt after configure with -phonon option. This takes time… Then I’ll try assemble task again. Will report results.

April 14, 2011

Volker Volker
Robot Herder
5428 posts

I don’t think it is a (L)GPL problem, but more some technical issues (maybe plugins and the like) with static versions.

April 14, 2011

Gourmand Gourmand
Lab Rat
154 posts

Nothing helps :-(

After reconfig with Phonon I’ve got it in static but still cannot assemble app. In addition to previous linkage error messages I get tons of messages like this:

  1. i:\Qt\2010.05s\qt\lib\libQtCored.a(qcoreapplication.o):I:\Qt\2010.05s\qt\src\corelib/kernel/qcoreapplication.cpp:151: multiple definition of `QCoreApplicationPrivate::checkInstance(char const*)'

Of course I can use dynamically linked Qt for this app. But then I will have provide more than 100 megabytes in DLLs (QtCore, QtGui, QtNetwork, QtWebKit and may be more). This all for small application allowing users just exchange their data in local network… Somebody else could solve this using Delphy without this complexity and extra megabytes.

 
  ‹‹ creating self-signed sis file via remote compiler in Linux      Compiling projects ››

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