VLC 0.9.2 compiling problem: problem with qt4

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Boo025
Blank Cone
Blank Cone
Posts: 26
Joined: 24 Sep 2008 16:54

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby Boo025 » 30 Sep 2008 22:07

How do you go about compiling the code using gcc4 instead of gcc3?

concheng
Blank Cone
Blank Cone
Posts: 23
Joined: 20 Sep 2008 02:16

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby concheng » 30 Sep 2008 23:51

the problem is cygwin doesn't have gcc4.....and I don't know how to install gcc4 on cygwin....I ran the compile again...and still run into the same error like following

/libqt4_plugin_la-dialogs_provider.o
In file included from dialogs_provider.cpp:44:
dialogs/preferences.hpp:82: error: expected unqualified-id before "char"
dialogs/preferences.hpp:82: error: abstract declarator `QRadioButton*' used as d
eclaration
dialogs/preferences.hpp:82: error: expected `;' before "char"
make[6]: *** [libqt4_plugin_la-dialogs_provider.lo] Error 1
make[6]: Leaving directory `/cygdrive/c/vlc/modules/gui/qt4'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/cygdrive/c/vlc/modules/gui/qt4'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/cygdrive/c/vlc/modules/gui'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/cygdrive/c/vlc/modules/gui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/cygdrive/c/vlc/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/c/vlc'
make: *** [all] Error 2

Superman@Titan /cygdrive/c/vlc
$

I tried to comment all the QRadioButton related code, and then it can compile and build with no error, but the executable won't work.....
Please! VLC_help!! can you describe to me exactly how your procedure work? How your cygwin configure? and what windows edition you used?
in order to run this code, I even have my window xp home edition reinstalled to eliminate any software conflict problem...like antivir software and some web develop tool.....

Boo025
Blank Cone
Blank Cone
Posts: 26
Joined: 24 Sep 2008 16:54

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby Boo025 » 01 Oct 2008 00:25

I'm just about out of idea. :-|

Boo025
Blank Cone
Blank Cone
Posts: 26
Joined: 24 Sep 2008 16:54

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby Boo025 » 01 Oct 2008 00:32

By any chance are you (VLC_help) compiling under the linux environment and not cygwin?

concheng
Blank Cone
Blank Cone
Posts: 23
Joined: 20 Sep 2008 02:16

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby concheng » 01 Oct 2008 00:49

my current problem is that apparently the QRadioButton declaration on both preferences.cpp and preferences.hpp can't be found. it do have #include <QRadioButton> in preferences.cpp but somehow vlc or qt4 can't see each other in this particular case.....I don't know how to solve this...anybody know how this problem happen? i am not expert on C++, maybe something I miss

concheng
Blank Cone
Blank Cone
Posts: 23
Joined: 20 Sep 2008 02:16

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby concheng » 01 Oct 2008 00:57

by the way, the problem danish22 has is already be mentioned by me at begin of this post and a possible solution is that (at least it worked for me)
on qatomic_windows.h line 392...modify the code into following

#if defined(Q_CC_GNU)
#include <windows.h>
#endif
#ifndef __INTERLOCKED_DECLARED

extern "C" {
__declspec(dllimport) long __stdcall InterlockedCompareExchange(long *, long, long);
__declspec(dllimport) long __stdcall InterlockedIncrement(long *);
__declspec(dllimport) long __stdcall InterlockedDecrement(long *);
__declspec(dllimport) long __stdcall InterlockedExchange(long *, long);
__declspec(dllimport) long __stdcall InterlockedExchangeAdd(long *, long);
}

#endif /* __INTERLOCKED_DECLARED */

hope your compilation will work.....O.O

Boo025
Blank Cone
Blank Cone
Posts: 26
Joined: 24 Sep 2008 16:54

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby Boo025 » 01 Oct 2008 02:37

Strange, I've actually tried the #ifndef and it produced same error...

concheng
Blank Cone
Blank Cone
Posts: 23
Joined: 20 Sep 2008 02:16

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby concheng » 01 Oct 2008 02:44

dude, I think you forgot to put following code


#if defined(Q_CC_GNU)
#include <windows.h>
#endif

before the #ifndef

danish22
New Cone
New Cone
Posts: 2
Joined: 30 Sep 2008 12:11

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby danish22 » 01 Oct 2008 06:36

vlc_help, Can you please provide the compiled binary for the qt4 module. I don't have to change any file in qt4 folder so objs and archives file should do. Actually there should be some repository for pre-built archives for all modules. One could have proceeded ahead while this problem is resolved.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby VLC_help » 01 Oct 2008 13:40

Ones from nightlies should work if you need pre compiled plugins.

And I compile with http://wiki.videolan.org/Win32CompileCygwinNew with that using Win32 because I don't have Linux machines around. I will try build today to see, If there are some issues somewhere.

And I used qt4-4.4.1-win32-bin.tar.bz2, it should have md5sum of 063496054405c654fbb2208a1ee9da9a *qatomic_windows.h

EDIT:
It seems latest git.exe works again from Cygwin shell.

EDIT2:
I got it now also, the InterlockedCompareExchange (I don't know why this didn't happen on my other machine, maybe my winbase.h is different, I have to check this out on weekend).
http://www.nabble.com/Problem-compile-Q ... 92075.html
according to that, it is Qt problem. I reported this issue to Qt, hopefully it will be fixed.

Boo025
Blank Cone
Blank Cone
Posts: 26
Joined: 24 Sep 2008 16:54

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby Boo025 » 01 Oct 2008 15:43

I searched for qt4-4.4.1-win32-bin.tar.bz2 but didn't find anything.

Boo025
Blank Cone
Blank Cone
Posts: 26
Joined: 24 Sep 2008 16:54

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby Boo025 » 01 Oct 2008 16:15

Can you post your configure-vlc.sh?

Edit:
To VLC_help

I managed to get the same md5sum file of qatomic_windows.h (it was from qt-win-opensource-src-4.4.1 not qt4-4.4.1-win32-bin.tar.bz2), and followed your instruction by copying lib and include folder from the Qt package to the /usr/win32 folder.

However, all it did was produce bunch of (linking?) error, which I have already posted on the second page of this thread) and just made the problem worse.

http://www.nabble.com/Problem-compile-Q ... 92075.html

Regarding the above link you posted, I have actually ran into that thread while searching for a solution. I tried one of the poster's solution of by putting #ifndef but that gave me the Qradiobutton error (which concheng also got).

So as a experiment, I've tried the old contrib file "contrib-20071002-win32-bin-gcc-3.4.5-runtime-3.12-only.tar.bz2" from http://people.videolan.org/~jb/Contribs/ but it STILL gave the same error.

And have tried wiping cygwin and started from scratch (so many times that I forgot how much); it didn't really help either. I've also tried with downgrading the mingw-runtime and it still produced same (the interlocked) error.

Boo025
Blank Cone
Blank Cone
Posts: 26
Joined: 24 Sep 2008 16:54

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby Boo025 » 01 Oct 2008 20:53

I decided to just go with the older build (0.8.6i) due to the Qt problems...

This is what I did to get the 0.8.6i build to compile correctly:
1. Setup Cygwin as explained in http://wiki.videolan.org/Win32CompileCygwinNew page.

2. When installing the packages for Cygwin DO NOT install "mingw-runtime".

3. Download the older version of "mingw-runtime" from http://download.thaigrid.or.th/pub/cygw ... -1.tar.bz2

4. Download the older contrib file from http://people.videolan.org/~jb/Contribs ... ly.tar.bz2

5. Save both of them in your Cygwin installed folder. (eg. C:\Cygwin)

6. Launch Cygwin and change directory to the Cygwin installed folder, where the downloaded files are located. Use the following command to install the packages; don't just extract the files using WinRAR or etc.

Code: Select all

tar xjvf mingw-runtime-3.10-1.tar.bz2 -C / tar xjvf contrib-20071002-win32-bin-gcc-3.4.5-runtime-3.12-only.tar.bz2 -C /
7. Download the vlc-0.8.6i source from http://download.videolan.org/pub/videolan/vlc/0.8.6i/ and extract it at a location you desire.

8. Create a new file for "configure-vlc.sh" use the following setting:

Code: Select all

./bootstrap && \ PKG_CONFIG_PATH=/usr/win32/lib/pkgconfig \ CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \ LDFLAGS=-L/usr/win32/lib \ CC="ccache gcc -mno-cygwin" CXX="ccache g++ -mno-cygwin" \ ./configure \ --disable-gtk \ --enable-nls --enable-sdl --with-sdl-config-path=/usr/win32/bin \ --enable-ffmpeg --with-ffmpeg-mp3lame \ --with-ffmpeg-zlib --enable-faad --disable-flac --enable-theora \ --with-wx-config-path=/usr/win32/bin \ --with-freetype-config-path=/usr/win32/bin \ --with-fribidi-config-path=/usr/win32/bin \ --enable-live555 --with-live555-tree=/usr/win32/live.com \ --enable-caca --with-caca-config-path=/usr/win32/bin \ --with-xml2-config-path=/usr/win32/bin \ --with-dvdnav-config-path=/usr/win32/bin \ --disable-cddax --disable-vcdx --enable-goom \ --enable-twolame --enable-dvdread \ --disable-mkv \ --enable-debug
REMOVE "ccache" from CC and CCX line from the script if you don't use ccache. Don't forget to do "dos2unix configure-vlc.sh" after saving the file.

9. After it's done just do "make" then "make package-win32-zip" and look for the zip file. Note that the above configuration doesn't have support for FLAC and mkv; it errors if you enable it.

Hope it helps...

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby VLC_help » 02 Oct 2008 16:05

As I suspected, problem is between qt4 and w32 api. According to trolltech support staff version 3.11 w32 api should work.
http://trolltech.com/developer/task-tra ... thod=entry

concheng
Blank Cone
Blank Cone
Posts: 23
Joined: 20 Sep 2008 02:16

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby concheng » 03 Oct 2008 23:23

It work!! I downgraded my w32 apI to version 3.11which you can download here: http://linux.rz.ruhr-uni-bochum.de/down ... -2/w32api/
and then compile. at first, I ran into a error: cannot find lqjpeg, then I found the solution from previous post. the solution is to dowload qt4-4.4.1-win32-bin.tar.bz2 from http://downloads.videolan.org/pub/video ... 5/contrib/ and then copy libqjpeg.a in package into /win32 directory. then no anymore error, I typed make package-win32-base, after that I copy the vlc-0.9.3 fold generated by make command to other directory. I tried play a DVD and music CD on it, everything work!! thank you very much!!! vlc_help!!!!!

jack_jones
Blank Cone
Blank Cone
Posts: 14
Joined: 04 Sep 2008 05:08

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby jack_jones » 06 Oct 2008 10:08

I have the same problem with concheng:
"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winbase.h:1663: er
ror: declaration of C function `LONG InterlockedCompareExchange(volatile LONG*,
LONG, LONG)' conflicts with
/usr/win32/include/qt4/QtCore/../src/corelib/arch/qatomic_windows.h:393: error:
previous declaration `long int InterlockedCompareExchange(long int*, long int, l
ong int)' here
......

/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winbase.h:1676: er
ror: declaration of C function `LONG InterlockedIncrement(volatile LONG*)' confl
icts with
/usr/win32/include/qt4/QtCore/../src/corelib/arch/qatomic_windows.h:394: error:
previous declaration `long int InterlockedIncrement(long int*)' here
make[6]: *** [libqt4_plugin_la-qt4.lo] Error 1
make[6]: Leaving directory `/cygdrive/c/cygwin/modules/gui/qt4'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/cygdrive/c/cygwin/modules/gui/qt4'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/cygdrive/c/cygwin/modules/gui'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/cygdrive/c/cygwin/modules/gui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/cygdrive/c/cygwin/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/c/cygwin'
make: *** [all] Error 2
"
I updated the qt4 with"qt4-4.4.1-win32-bin.tar.bz2",but it is not useful.

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: VLC 0.9.2 compiling problem: problem with qt4

Postby Jean-Baptiste Kempf » 06 Oct 2008 10:14

Downgrade your win32api
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.

jack_jones
Blank Cone
Blank Cone
Posts: 14
Joined: 04 Sep 2008 05:08

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby jack_jones » 06 Oct 2008 11:32

Where can I download the win32api?
Thank you.

jack_jones
Blank Cone
Blank Cone
Posts: 14
Joined: 04 Sep 2008 05:08

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby jack_jones » 07 Oct 2008 02:16

:) ,sorry.
Now I see the link for win32api :http://linux.rz.ruhr-uni-bochum.de/down ... -2/w32api/
thank you too,concheng .

ariko
New Cone
New Cone
Posts: 2
Joined: 21 Oct 2008 16:44

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby ariko » 22 Oct 2008 10:33

Hi all,

Now I compile VLC on Cygwin , but I stuck at this errors. I've read the previous post that I should downgrade my win32api , but how to do it. Please explain clearly. I'm using contrib-20080528-win32-bin-gcc-4.2.1-sjlj-runtime-3.13-only.tar.bz2. Thanks you.



/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winbase.h:1663: er
ror: declaration of C function `LONG InterlockedCompareExchange(volatile LONG*,
LONG, LONG)' conflicts with
/usr/win32/include/qt4/QtCore/../src/corelib/arch/qatomic_windows.h:194: error:
previous declaration `long int InterlockedCompareExchange(long int*, long int, l
ong int)' here
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winbase.h:1667: er
ror: declaration of C function `LONG InterlockedDecrement(volatile LONG*)' confl
icts with
/usr/win32/include/qt4/QtCore/../src/corelib/arch/qatomic_windows.h:196: error:
previous declaration `long int InterlockedDecrement(long int*)' here
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winbase.h:1668: er
ror: declaration of C function `LONG InterlockedExchange(volatile LONG*, LONG)'
conflicts with
/usr/win32/include/qt4/QtCore/../src/corelib/arch/qatomic_windows.h:197: error:
previous declaration `long int InterlockedExchange(long int*, long int)' here
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winbase.h:1672: er
ror: declaration of C function `LONG InterlockedExchangeAdd(volatile LONG*, LONG
)' conflicts with
/usr/win32/include/qt4/QtCore/../src/corelib/arch/qatomic_windows.h:198: error:
previous declaration `long int InterlockedExchangeAdd(long int*, long int)' here

/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winbase.h:1676: er
ror: declaration of C function `LONG InterlockedIncrement(volatile LONG*)' confl
icts with
/usr/win32/include/qt4/QtCore/../src/corelib/arch/qatomic_windows.h:195: error:
previous declaration `long int InterlockedIncrement(long int*)' here
In file included from ../../../include/vlc_common.h:500,
from qt4.hpp:32,
from qt4.cpp:37:
../../../include/vlc_mtime.h:84: warning: `error' attribute directive ignored
../../../include/vlc_mtime.h:94: warning: `warning' attribute directive ignored
../../../include/vlc_mtime.h:112: warning: `error' attribute directive ignored
make[6]: *** [libqt4_plugin_la-qt4.lo] Error 1
make[6]: Leaving directory `/cygdrive/c/VLC/Downloads/vlc/modules/gui/qt4'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/cygdrive/c/VLC/Downloads/vlc/modules/gui/qt4'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/cygdrive/c/VLC/Downloads/vlc/modules/gui'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/cygdrive/c/VLC/Downloads/vlc/modules/gui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/cygdrive/c/VLC/Downloads/vlc/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/c/VLC/Downloads/vlc'
make: *** [all] Error 2

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: VLC 0.9.2 compiling problem: problem with qt4

Postby Jean-Baptiste Kempf » 22 Oct 2008 12:25

I am going to provide new contribs.
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.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby VLC_help » 22 Oct 2008 13:24

ariko: just download w32api 3.11 from http://linux.rz.ruhr-uni-bochum.de/down ... -1.tar.bz2 there and extract the contest to cygwin folder. make package-win32-base is broken ATM so I suggest to wait 'till it gets fixed (and wait 'till j-b releases new contribs).

ariko
New Cone
New Cone
Posts: 2
Joined: 21 Oct 2008 16:44

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby ariko » 22 Oct 2008 15:34

Thanks j-b and VLC_help for your reply. I wait to download the new contribs.

slowbeat
New Cone
New Cone
Posts: 1
Joined: 24 Oct 2008 13:25

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby slowbeat » 24 Oct 2008 20:32

replace "small" to "ssmall" ( in preferences.hpp and preferences.cpp )

ex) QRadioButton *ssmall,*all; <---- THIS IS THE LINE 82

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC 0.9.2 compiling problem: problem with qt4

Postby VLC_help » 25 Oct 2008 15:52

replace "small" to "ssmall" ( in preferences.hpp and preferences.cpp )

ex) QRadioButton *ssmall,*all; <---- THIS IS THE LINE 82
?


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 111 guests