Hi Carsten,

the code snippet that causes the error is this one:

line 56:    if( e->type() != QEvent::KeyPress || object != ui.inputArea )
line 57:        return false;

X11 define KeyPress (as a preprocessor definition) and Qt uses it as an
Enum. If I replace QEvent:KeyPress for it constant value (6), it works...

The cmake output with the gcc error on the above code is:

/src/core/ui/LuaConsoleWidget.cpp: In member function ‘virtual bool
LuaConsoleWidget::eventFilter(QObject*, QEvent*)’:
/src/core/ui/LuaConsoleWidget.cpp:56: error: expected unqualified-id before
numeric constant
/src/core/ui/LuaConsoleWidget.cpp:56: error: expected `)' before numeric
constant
make[2]: *** [src/core/CMakeFiles/siviep-core.dir/ui/LuaConsoleWidget.cpp.o]
Error 1
make[2]: *** Waiting for unfinished jobs....

Thanks,
Pablo

On Tue, May 12, 2009 at 11:38 AM, Carsten Neumann
<[email protected]>wrote:

>        Hello Pablo,
>
> Pablo Carneiro Elias wrote:
> > I've just updated to the last svn version of OpenSG 2.0 yesterday and I
> > got some compilation errors involving a conflict between X11 (included
> > from OSGNativeWindow.h which is included from OSGPassiveWindowBase.h)
> > and Qt under linux. The problem is that X11 defines many names that Qt
> > uses as Enums (such as KeyPress -> QEvent::KeyPress). It never happened
> > with the older version of OpenSG I had (dated from 2009-01-22).
>
> hm, strange, my build also picks up Qt, but it goes through fine. Can
> you set -DCMAKE_VERBOSE_MAKEFILE=ON on the cmake command line, rerun
> {c,}make and from the output send the compiler invocation and error
> output for a file that fails?
>
> > Is it possible for you to remove OSGNativeWindow.h from
> > OSGPassiveWindowBase.h?
>
> Only Gerrit can answer that, AFAIK he is in the middle of adding
> something that required that, but I don't know the details.
>
> > Or better yet, can you avoid including X11 from any public headers?
>
> I don't see how we could do that and still implement an X11Window ;)
>
>        Cheers,
>                Carsten
>
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to