Where is QtWidgets/QAction ?

This forum is about all development around libVLC.
DrHobo
New Cone
New Cone
Posts: 2
Joined: 16 Jul 2015 04:56

Where is QtWidgets/QAction ?

Postby DrHobo » 16 Jul 2015 05:17

Hello.

I'm following the wiki to compile VLC to cross-compile libVLC to Windows: https://wiki.videolan.org/Win32Compile/#Building_VLC
Using Ubuntu 14.10 to compile for 64-bits Windows (x86_64-w64-mingw32).

The wiki specifies that we install qt4-dev-tools and qt5-default.

However, compiling stops at this error:

Code: Select all

make[5]: Entering directory '/home/narc/vlc/win32/modules/gui/qt4' CXX libqt4_plugin_la-qt4.lo In file included from ../../../../extras/package/win32/../../../modules/gui/qt4/dialogs/open.hpp:35:0, from ../../../../extras/package/win32/../../../modules/gui/qt4/dialogs_provider.hpp:36, from ../../../../extras/package/win32/../../../modules/gui/qt4/qt4.cpp:38: ./ui/open.h:14:29: fatal error: QtWidgets/QAction: No such file or directory #include <QtWidgets/QAction> ^ compilation terminated.
When I look at my Qt include files in /usr/include/qt4, all I see is this:

Code: Select all

drwxr-xr-x 21 root root 4096 Jul 15 15:27 . drwxr-xr-x 49 root root 16384 Jul 15 16:52 .. drwxr-xr-x 2 root root 36864 Jul 15 15:27 Qt drwxr-xr-x 2 root root 16384 Jul 15 15:27 Qt3Support drwxr-xr-x 2 root root 24576 Jul 15 15:27 QtCore drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtDBus drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtDeclarative drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtDesigner drwxr-xr-x 2 root root 40960 Jul 15 15:27 QtGui drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtHelp drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtNetwork drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtOpenGL drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtScript drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtScriptTools drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtSql drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtSvg drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtTest drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtUiTools drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtWebKit drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtXml drwxr-xr-x 2 root root 4096 Jul 15 15:27 QtXmlPatterns
Many forums specialized in Qt talk about adding Qt += widgets in some *.pro file with Qt 5. But I don't think the wiki expected a full Qt 5 environment to be installed (and besides, qt5-default is a small package of a few files : http://packages.ubuntu.com/utopic/amd64 ... t/filelist) and the only *.pro file available is in the doc directory:

Code: Select all

find | grep "\.pro" ./modules/stream_out/chromecast/cast_channel.proto ./doc/libvlc/QtPlayer/QtVLC.pro
So what would be the necessary steps to complete this compilation ?

Regards.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Where is QtWidgets/QAction ?

Postby Jean-Baptiste Kempf » 16 Jul 2015 10:40

Use update-alternatives to have uic set to qt4, and not qt5
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

DrHobo
New Cone
New Cone
Posts: 2
Joined: 16 Jul 2015 04:56

Re: Where is QtWidgets/QAction ?

Postby DrHobo » 16 Jul 2015 18:51

Thanks Jean-Baptiste.

Simply changing the qt version wasn't enough (or the changing operation failed, somewhat) and it kept me giving the same error.

I always deleted the moc, uic and rcc files in the contrib/x86_64-w64-mingw32/bin, but this time I kept them assuming that the warning in the wiki entitled Linux 64-bit was for compiling a 32-bit version (since the alternative was to install ia32-libs, etc) and hoping they would be compatible with my build. It may not be the best solution, but at least I got it compiled.

So if anybody else is reading this, proceed with caution. :)

profootball
New Cone
New Cone
Posts: 1
Joined: 27 Feb 2016 16:51

Re: Where is QtWidgets/QAction ?

Postby profootball » 27 Feb 2016 16:54

Hi DrHobo,

may I ask what is your final solution?
keep those moc files?

thanks.

stavrosg
New Cone
New Cone
Posts: 4
Joined: 16 Dec 2016 16:59

Re: Where is QtWidgets/QAction ?

Postby stavrosg » 19 Dec 2016 17:17

I am having this issue aswell. Whats is being refereed to by update-alternatives?

Stav

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Where is QtWidgets/QAction ?

Postby Rémi Denis-Courmont » 19 Dec 2016 19:37

It's a Debian tool to select between, well, alternatives. See manual pages or Debian documentation.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

stavrosg
New Cone
New Cone
Posts: 4
Joined: 16 Dec 2016 16:59

Re: Where is QtWidgets/QAction ?

Postby stavrosg » 19 Dec 2016 20:15

Thanks Remi,

Got it working, my work flow;

git config --system core.autocrlf false
git clone git://git.videolan.org/vlc/vlc-2.2.git vlc
cd vlc
mkdir -p contrib/win32 && cd contrib/win32
../bootstrap --host=i686-w64-mingw32
make prebuilt
rm -f ../i686-w64-mingw32/bin/moc ../i686-w64-mingw32/bin/uic ../i686-w64-mingw32/bin/rcc
cd -
./bootstrap
mkdir win32 && cd win32
export PKG_CONFIG_LIBDIR=/samba/vlc/contrib/i686-w64-mingw32/lib/pkgconfig
../extras/package/win32/configure.sh --host=i686-w64-mingw32 --build=x86_64-pc-linux-gnu
*NOTE, not sure it did anything* added "QT += widgets" to vlc/doc/libvlc/QtPlayer/QtVLC.pro
make clean <- extra step, found on wireshark forums
make
make package-win-common

BTW love the app, use it tons. Excellent work and thanks!!

Cheers
Stav

ryantheseer
Blank Cone
Blank Cone
Posts: 15
Joined: 16 Feb 2017 20:19

Re: Where is QtWidgets/QAction ?

Postby ryantheseer » 23 Feb 2017 17:41

I tried building for Windows 64-bit from the 2.2.4 tag in vlc-2.2.git from Linux (Ubuntu 64-bit 16.04). I followed these steps after setting up the toolchain, from a folder named ~/dev/ on the Linux machine:

Code: Select all

git clone git://git.videolan.org/git/vlc-2.2.git vlc cd vlc mkdir -p contrib/win32 cd contrib/win32 ../bootstrap --host=x86_64-w64-mingw32 make prebuilt
(Skipped the Linux 64-bit removals step)

Code: Select all

ln -sf 'x86_64-w64-mingw32' ../i686-w64-mingw32 cd ../ ls -l cd ../ ./bootstrap mkdir win32 && cd win32 export PKG_CONFIG_LIBDIR=$HOME/dev/vlc/contrib/x86_64-w64-mingw32/lib/pkgconfig ../configure --host=x86_64-w64-mingw32 --build=x86_64-pc-linux-gnu make


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 10 guests