On Friday 18 Jun 2010 20:10:16 Maxim Gammer wrote:
> error:
> Scanning dependencies of target osgQt
> [ 98%] Building CXX object
> src/osgQt/CMakeFiles/osgQt.dir/QFontImplementation.o [ 98%] Building CXX
> object src/osgQt/CMakeFiles/osgQt.dir/QGraphicsViewAdapter.o [ 98%]
> Building CXX object src/osgQt/CMakeFiles/osgQt.dir/QWidgetImage.o [ 98%]
> Building CXX object
> src/osgQt/CMakeFiles/osgQt.dir/__/__/include/osgQt/moc_QGraphicsViewAdapter
> .o
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/inclu
> de/osgQt/moc_QGraphicsViewAdapter.cxx:11:2: error: #error "The header file
> 'QGraphicsViewAdapter' doesn't include <QObject>."
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:19: error: expected constructor,
> destructor, or type conversion before 'static'
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:45: error: 'QMetaObject' does not name
> a type
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:54: error: expected initializer before
> '*' token
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:59: error: 'osgQt' has not been
> declared
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx: In function 'void* qt_metacast(const
> char*)':
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:62: error: 'strcmp' was not declared
> in this scope
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected type-specifier
> before 'QGraphicsViewAdapter'
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected '>' before
> 'QGraphicsViewAdapter'
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected '(' before
> 'QGraphicsViewAdapter'
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: 'QGraphicsViewAdapter' was
> not declared in this scope
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected primary-expression
> before '>' token
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: invalid use of 'this' in
> non-member function
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:63: error: expected ')' before ';'
> token
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:64: error: 'QObject' has not been
> declared
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx: At global scope:
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: 'osgQt' has not been
> declared
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: 'QMetaObject' has not been
> declared
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: expected primary-expression
> before 'int'
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:67: error: expected primary-expression
> before 'void'
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/includ
> e/osgQt/moc_QGraphicsViewAdapter.cxx:67: warning: initializer expression
> list treated as compound expression
> /home/maximum2000/DEVELOP/OpenSceneGraph-2.9.8/tempo/src/osgQt/__/__/inclu
> de/osgQt/moc_QGraphicsViewAdapter.cxx:68: error: expected ',' or ';' before
> '{' token
> make[2]: ***
> [src/osgQt/CMakeFiles/osgQt.dir/__/__/include/osgQt/moc_QGraphicsViewAdapt
> er.o] Ошибка 1
> make[1]: *** [src/osgQt/CMakeFiles/osgQt.dir/all] Ошибка 2
> make: *** [all] Ошибка 2
I have just come across the same error, when building OSG 2.9.8 out-of-source
through a gentoo ebuild. Building the same in-source seems to work OK.
After looking at the documentation for FindQt4.cmake I came up with the
solution to pass the "-f" OPTION to QT4_WRAP_CPP:
diff --git a/src/osgQt/CMakeLists.txt b/src/osgQt/CMakeLists.txt
index 69cc12f..6794d57 100644
--- a/src/osgQt/CMakeLists.txt
+++ b/src/osgQt/CMakeLists.txt
@@ -12,7 +12,7 @@ SET(SOURCES_H
${HEADER_PATH}/QGraphicsViewAdapter
)
-QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} )
+QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
SET(LIB_PUBLIC_HEADERS
Full src/osgQt/CMakeLists.txt submitted to osg-submissions.
Regards,
Magnus
>
> 2010/6/18 Robert Osfield <[email protected]>:
> > Hi All,
> >
> > I have just tagged the OpenSceneGraph-2.9.8 dev release. Thanks to
> > all those who've contributed to development these four months since
> > the last dev release, and all those that have been testing/debugging
> > over the last day. I've put a quick summary of changes up on
> >
> > http://www.openscenegraph.org/projects/osg/wiki/Downloads/DeveloperRel
> > eases
> >
> > Which reads:
> > * OpenSceneGraph-2.9.8, released on 18th June 2009, key
> >
> > deliverables in this dev release are:
> > o Revamped 3ds plugin that supports and reading and writing,
> >
> > and now uses a latest lib3ds source code.
> >
> > o New osgDB serializers and associated .osgt (text), .osgb
> >
> > (binary) and .osgx (xml) file formats that are extensible, and
> > deprecate the old .osg and .ive formats.
> >
> > o Revamp of osgGA CameraManipulators
> > o New osgQT library for integrating QT and OpenSceneGraph
> > o Range of improvements to the FBX plugin
> > o Rewrite of osg::observer_ptr<> and osg::Observer, with
> >
> > introduce of new ObserverNodePath class, for addressing threading
> > issues with old implementation.
> >
> > o A range of improvements to DatabasePager to improve
> >
> > performance, reduced memory usage, and address crashes/deadlocks.
> >
> > o Fixes to memory usage in TerraPage (.txp) plugin.
> > o Improvements to the Graphviz .dot plugin and added support
> >
> > for dot diagrams to !Present3D application.
> >
> > o Improvements to COLLADA .dae plugin, including adding
> >
> > support for animation using osgAnimation.
> >
> > o Support for static linking of OpenGL ES 2.0.
> > o Improvements to Inventor and VRML plugins.
> > o Support for automatic boundary equalization in osgTerrain
> >
> > databases (requires databases to built with updated
> > VirtualPlanetBuilder to take advantage of it.)
> >
> > o New OSG_INFO/OSG_NOTICE/OSG_WARN/OSG_DEBUG macro's that
> >
> > add a condition infront of the underlying osg::notify(..) call they
> > provide to avoid executing stream code when messages were being
> > discarded, and also done in a way that compilers can optimize the
> > notification code out completely when notification is completely
> > disabled via the new cmake GOSG_NOTIFY_DISABLE variable. Under Windows
> > this new feature avoids a hitting a contended global mutex that
> > Microsoft uses in it ostream implementation and results in a
> > noticeable improvement in speed. All platforms will benefit from lower
> > overheads as well, but not quite as dramatic as under windows.
> >
> > o Many general bug fixes and minor feature
> >
> > improvements/optimizations.
> >
> > source package : OpenSceneGraph-2.9.8.zip
> > svn tag: svn co
> >
> > http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-
> > 2.9.8 OpenSceneGraph
> >
> > Cheers,
> > Robert.
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org