Вопрос

I am modifying vlc source code and have added a few UI screens. I needed to use QtNetwork package where as by default vlc only has QtCore and QtGui packages.

While compiling for Linux i modified the primary vlc configure.ac to include QtNetwork and it worked fine. But when i attempted to cross compile following the standard process, the configure steps fails i.e.

../extras/package/win32/configure.sh --host=i686-w64-mingw32

indicating failure to locate QtNetwork

Update: Latter when QtNetwork was enabled, still i was getting undefined references to QtNetwork related classes and their functions.

Это было полезно?

Решение

I finally got this working with mainly help from Olivier at VLC forums. It assumes you are already familiar with cross compiling vlc for windows on Linux.

First, as compiled for Linux with QtNetwork, i assume configure.ac under vlc parent directly also contains QtNetwork mentioned at every location QtGui or QtCore are.

Secondly, QtNetwork library is already built and we need to add "Network" after "Core" and "Gui" in contrib/src/qt4/rules.mak, under the "INSTALLING PKGCONFIG FILES" section. Of course, you also need a QtNetwork.pc.in file (copy and adapt QtGui.pc.in). Additional key library to add is -llws2_32 along with -lQtNetwork itself.

You also need to disable OpenSSL support explicitly, otherwise linking with libQtNetwork.a fails with unresolved symbols. One way to do that is to add QT_NO_OPENSSL to the src/network/network.pro. Since this file is generated during make .qt4, a patch should be created and applied for network.pro file similar to other patches used near the beginning of rules.mak file.

Details are in the following vlc dev thread

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top