VLC 2.0.2 compiling on Windows XP with MingGW/MSYS
Posted: 03 Jul 2012 17:13
I have experienced the following problem when compiling VLC on Windows XP since 2.0.2 update.
When compiling Qt4 module, it stops on dialogs_provider.cpp, as it has an include file (dialogs/preferences.hpp) with the following line:
(line 72: private members section).
The problem is that dialogs_provider.cpp includes main_interface.hpp which, in turn, includes <vlc_windows_interfaces.h> which now includes <objbase.h> (from TDM compiler) which through rpcndr.h defines small as a char. So the preprocessor changes the above line into:
Such thing is invalid, as char is a reserved word, so the compilation fails with the folloging unmeaningful info:
Regards,
When compiling Qt4 module, it stops on dialogs_provider.cpp, as it has an include file (dialogs/preferences.hpp) with the following line:
Code: Select all
QRadioButton *small,*all;
The problem is that dialogs_provider.cpp includes main_interface.hpp which, in turn, includes <vlc_windows_interfaces.h> which now includes <objbase.h> (from TDM compiler) which through rpcndr.h defines small as a char. So the preprocessor changes the above line into:
Code: Select all
QRadioButton *char,*all;
There is an evident workaround, that is to rename small variable into a different name. But I want to post here to help anyone which could find the same problem. If someone modifies the source to fix this bug, please, let me know to keep it in sync in the future.In file included from dialogs_provider.cpp:42:0:
dialogs/preferences.hpp: At global scope:
dialogs/preferences.hpp:72:19: error: expected unqualified-id before 'char'
dialogs/preferences.hpp:72:18: error: expected ';' at end of member declaration
dialogs/preferences.hpp:72:24: error: expected unqualified-id before ',' token
...some deprecation warnings...
make[1]: *** [libqt4_plugin_la-dialogs_provider.lo] Error 1
make[1]: Leaving directory `/vlc/modules/gui/qt4'
make: *** [all] Error 2
Regards,