> > yes, that works. > > Whoahey. > > Now you could do me a favour: Could you run that file through the preprocessor > only (i.e. g++ -E instead of g++ -c) and figure out who pulls in X.h (or > Xlib.h)?
are you talking about all occurences of X/lib/.h ? i'm bit confused what all the numbers mean, eg # 1 "/usr/include/X11/Xatom.h" 1 3 4 > > now remains > > ../../../src/DispatchResult.h: In constructor > > 'lyx::DispatchResult::DispatchResult()': > > ../../../src/DispatchResult.h:24: error: expected unqualified-id before > > numeric constant > > Probably something similar. Try > > #undef None yes, you are right. /me -> bed now; good night :) pavel http://195.113.31.123/~sanda/junk/dump.c $ g++ -DHAVE_CONFIG_H -I. -I../../../src -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_STL -DQT_NO_KEYWORDS -I../../../src -I../../../src/frontends -I../../../images -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I../../../boost -Wextra -Wall -O -MT liblyxqt4.lo -MD -MP -MF .deps/liblyxqt4.Tpo -c liblyxqt4.cpp -E | grep -A5 -B15 -E '/X.h|Xlib' # 48 "GuiApplication.cpp" 2 # 1 "/usr/include/qt4/QtCore/QSocketNotifier" 1 # 49 "GuiApplication.cpp" 2 # 1 "/usr/include/qt4/QtCore/QTextCodec" 1 # 50 "GuiApplication.cpp" 2 # 1 "/usr/include/qt4/QtCore/QTimer" 1 # 51 "GuiApplication.cpp" 2 # 1 "/usr/include/qt4/QtCore/QTranslator" 1 # 52 "GuiApplication.cpp" 2 # 1 "/usr/include/qt4/QtGui/QWidget" 1 # 53 "GuiApplication.cpp" 2 # 1 "/usr/include/X11/Xatom.h" 1 3 4 # 56 "GuiApplication.cpp" 2 # 1 "/usr/include/X11/Xlib.h" 1 3 4 # 60 "/usr/include/X11/Xlib.h" 3 4 # 1 "/usr/include/X11/X.h" 1 3 4 # 71 "/usr/include/X11/X.h" 3 4 typedef unsigned long XID; typedef unsigned long Mask; typedef unsigned long Atom; typedef unsigned long VisualID; typedef unsigned long Time; # 101 "/usr/include/X11/X.h" 3 4 typedef XID Window; typedef XID Drawable; typedef XID Font; typedef XID Pixmap; typedef XID Cursor; typedef XID Colormap; typedef XID GContext; typedef XID KeySym; typedef unsigned char KeyCode; # 61 "/usr/include/X11/Xlib.h" 2 3 4 # 1 "/usr/include/X11/Xfuncproto.h" 1 3 4 # 64 "/usr/include/X11/Xlib.h" 2 3 4 # 1 "/usr/include/X11/Xosdefs.h" 1 3 4 # 65 "/usr/include/X11/Xlib.h" 2 3 4 # 75 "/usr/include/X11/Xlib.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 76 "/usr/include/X11/Xlib.h" 2 3 4 # 93 "/usr/include/X11/Xlib.h" 3 4 extern int _Xmblen( char *str, int len ); typedef char *XPointer; # 180 "/usr/include/X11/Xlib.h" 3 4 typedef struct _XExtData { int number; struct _XExtData *next; int (*free_private)( struct _XExtData *extension -- } XKeyboardState; typedef struct { Time time; short x, y; } XTimeCoord; typedef struct { int max_keypermod; KeyCode *modifiermap; } XModifierKeymap; # 519 "/usr/include/X11/Xlib.h" 3 4 typedef struct _XDisplay Display; struct _XPrivate; struct _XrmHashBucketRec; -- typedef struct _XOC *XOC, *XFontSet; typedef struct { char *chars; int nchars; int delta; XFontSet font_set; } XmbTextItem; typedef struct { wchar_t *chars; int nchars; int delta; XFontSet font_set; } XwcTextItem; # 1124 "/usr/include/X11/Xlib.h" 3 4 typedef struct { int charset_count; char **charset_list; } XOMCharSetList; -- XPointer ); typedef void (*XIDProc)( Display*, XPointer, XPointer ); typedef unsigned long XIMStyle; typedef struct { unsigned short count_styles; XIMStyle *supported_styles; } XIMStyles; # 1236 "/usr/include/X11/Xlib.h" 3 4 typedef void *XVaNestedList; typedef struct { XPointer client_data; XIMProc callback; } XIMCallback; typedef struct { XPointer client_data; XICProc callback; } XICCallback; typedef unsigned long XIMFeedback; # 1260 "/usr/include/X11/Xlib.h" 3 4 typedef struct _XIMText { unsigned short length; XIMFeedback *feedback; int encoding_is_wchar; union { -- typedef struct _XIMPreeditStateNotifyCallbackStruct { XIMPreeditState state; } XIMPreeditStateNotifyCallbackStruct; typedef unsigned long XIMResetState; typedef unsigned long XIMStringConversionFeedback; # 1294 "/usr/include/X11/Xlib.h" 3 4 typedef struct _XIMStringConversionText { unsigned short length; XIMStringConversionFeedback *feedback; int encoding_is_wchar; union {