enable-final broken in kdelibs (redefinition of `const int XKeyPress')

Ellis Whitehead ellis at kde.org
Thu Oct 17 21:14:13 BST 2002

On Thursday 17 October 2002 18:22, Raffaele Sandrini wrote:
> In file included from libkdecore_la.all_cpp.cpp:31:
> kaccel.cpp:30: redefinition of `const int XKeyPress'
> kapplication.cpp:118: `const int XKeyPress' previously defined here
> kaccel.cpp:30: `KeyPress' was not declared in this scope
> In file included from libkdecore_la.all_cpp.cpp:32:
> kglobalaccel_x11.cpp: In method `bool KGlobalAccelPrivate::x11Event(_XEvent
> *)':kglobalaccel_x11.cpp:183: case label `XKeyPress' does not reduce to an
> integer constant

Could someone explain to me what's happening here?
What's the best way to check if a specific library (i.e., libkdecore) links 
with --enable-final on, when the rest of the project is without?
Would it work to change 'const int XKeyPress' to 'static const int XKeyPress' 
or should it be '#define XKeyPress KeyPress' instead?
Why is KeyPress listed as not declared in scope, when X.h was (via Xlib.h) 
included just 2 lines earlier?


More information about the kde-core-devel mailing list