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 |