Bad problems with X11 headers messing Qt headers no idea how to fix

Harald Fernengel harry at kdevelop.org
Wed Jul 27 08:19:53 CEST 2005


Hi,

On Tuesday 26 July 2005 22:02, Piotr Szymański wrote:
> Hello,
> In one file I am including
> #include <X11/Xlib.h>
> #include <X11/Xatom.h>
> and
> #include <qprinter.h>
>
> It wont build, stupid #defines from X11/X.h include in X11/Xlib.h
> completely break stuff (like GrayColor in an enum in qprinter is replace
> with 1 by the #define).
>
> I have completely no idea on how to fix it.. :(


the include order should be from special to generic:

#include <myspecialheader.h>

#include <somekdeheader.h>

#include <someqtheader.h>

#include <someX11header.h>

#include <stdlib.h>

this pattern should give you minimal symbol clashes.

Harald


More information about the Kde-soc mailing list