On Thursday 09 September 2010 15:55:24 lucie lemonnier wrote:
> Hi,
> 
> When I compile osgQt, I have this error :
> 
> 1>moc_QGraphicsViewAdapter.cxx
> 1>.\__\__\include\osgQt\moc_QGraphicsViewAdapter.cxx(11) : fatal error
> C1189: #error :  "The header file 'QGraphicsViewAdapter' doesn't include
> <QObject>."
> 
> How do I solve it?
> 
> Thank you!
> 
> Cheers,
> lucie


This issue was fixed in commit 11634, which is part of 2.9.9. The fix should 
apply cleanly to earlier versions, if you want to cherry-pick it.

You need to pass the "-f" option to Qt's moc, if you are doing out-of-tree 
builds.

HTH,

Magnus

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



> 
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31468#31468
> 
> 
> 
> 
> 
> _______________________________________________
> 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

Reply via email to