PDA

View Full Version : Compiling on Mandrake cooker, qt-3.0.4 rpm



barbatruc
06-29-2002, 02:48 AM
Compiling on Mandrake 8.3 cooker gets you the following message:

interface.o: In function `EQInterface::setTheme(int)':
/home/nico/showeq/showeq/src/interface.cpp:5118: undefined
reference to `QCDEStyle::QCDEStyle[in-charge](bool)'
/home/nico/showeq/showeq/src/interface.cpp:5152: undefined
reference to `QSGIStyle::QSGIStyle[in-charge](bool)'
collect2: ld returned 1 exit status
make[2]: *** [showeq] Erreur 1

Apparently this is due to the fact that Mandrake as well as Debian don't include the style classes, but don't reference this change in qconfig.h.

However, doing the proper thing in qconfig.h:
#define QT_NO_STYLE_CDE
#define QT_NO_STYLE_MOTIF
#define QT_NO_STYLE_SGI
#define QT_NO_STYLE_WINDOWS
does'nt work:

interface.cpp: In member function `int EQInterface::setTheme(int)':
interface.cpp:5103: parse error before `)' token
interface.cpp:5109: parse error before `)' token
interface.cpp:5118: parse error before `(' token
interface.cpp:5144: parse error before `)' token
interface.cpp:5152: parse error before `(' token
interface.cpp:5160: parse error before `)' token
So I had to remove the references to the style classes:

$ cvs diff src/interface.cpp
Index: src/interface.cpp
================================================== =================
RCS file: /cvsroot/seq/showeq/src/interface.cpp,v
retrieving revision 1.38
diff -r1.38 interface.cpp
5103c5103
< qApp->setStyle( (QStyle *) new QPlatinumStyle );
---
> // qApp->setStyle( (QStyle *) new QPlatinumStyle );
5109c5109
< qApp->setStyle( (QStyle *) new QWindowsStyle );
---
> // qApp->setStyle( (QStyle *) new QWindowsStyle );
5118c5118
< qApp->setStyle( (QStyle *) new QCDEStyle( theme == 3 ? TRUE : FALSE ) );---
> // qApp->setStyle( (QStyle *) new QCDEStyle( theme == 3 ? TRUE : FALSE ) );
5144c5144
< qApp->setStyle( (QStyle *) new QMotifStyle );
---
> // qApp->setStyle( (QStyle *) new QMotifStyle );
5152c5152
< qApp->setStyle( (QStyle *) new QSGIStyle( FALSE ) );
---
> // qApp->setStyle( (QStyle *) new QSGIStyle( FALSE ) );
5160c5160
< qApp->setStyle( (QStyle *) new QMotifStyle );
---
> // qApp->setStyle( (QStyle *) new QMotifStyle );
This works but maybe this should be doable through options?

fryfrog
06-29-2002, 09:00 AM
maybe you should be compiling qt-2.3.2 with gcc3 instead of using the qt that comes with mdk like everyone else? :)

Ment
09-16-2002, 06:26 PM
Nice patch, not perfect but enough to make it work ;)

Thanks