(Answer) (Category) Linux on PowerPC FAQ-O-Matic : (Category) Languages and Compilers :
Qt - how to compile for MkLinux?
For those of you who have tried to compile Qt 1.1 or 1.2 ( the 
C++ GUI library that's becoming quite popular) for 
MkLinux, but are plagued by compiler errors, here is what 
I have found to work around the troubles:

To compile Qt for a static-library system, make the following 
modification in file qptr_x11.cpp:
- add the line 
   #define qRound(x) (int)(x) 
to circumvent the actual function definition as found in the
file qglobal.h, which is:
inline int qRound(double d) 
{
   return d > 0.0 ? int(d+0.5) : int(d-0.5);
}

Everything should build fine now (I have compiled both Qt 1.1 and 
1.2 on MkLinux DR2.1 with this modification).

To build for a shared-library system on MkLinux, it is rumored 
that removing all optimization flags will do the trick (ie, 
change -O2 to -O0) without the need to trap the qRound function. 


For more info on Qt, visit  Troll Tech. 

This tip was provided by  Tricky S 
[Append to This Answer]
Previous: (Answer) Why does gcc's -mcpu=601 option produce broken executables?
Next: (Answer) Can't assign to va_list's (C/C++)
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=153
[Search] [Appearance]
This is a Faq-O-Matic 2.717d.
Hosted by anduin.org and SourceForge Logo