Hi everyone, I am quite new to cmake and coin3d. So please don't blame me ask so a dump question.
I have successfully tested coin3d code with "soqt-config --build main main.cpp" command, it works fine. After that I created a non-QT project (C++) with cmake. After that I build them with build tab in tools. But I have got the following error:
/usr/include/Inventor/Qt/SoQt.h:48: error: qobject.h: No such file or directory
#include <qobject.h>
^
And my code is:
#include <Inventor/Qt/SoQt.h>
#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoCube.h>
#include <qobject>
int main(int argc, char ** argv)
{
QWidget * mainwin = SoQt::init(argc, argv, argv[0]); // pass the app name
// if unsucessful, exit.
if (mainwin == NULL)
{
exit(1); //
}
// make a scene
SoSeparator * root = new SoSeparator; //
root->ref();
SoCube *cube = new SoCube;
root->addChild(cube);
SoQtExaminerViewer * eviewer = new
SoQtExaminerViewer(mainwin);
eviewer->setSceneGraph(root);
eviewer->show();
SoQt::show(mainwin);
SoQt::mainLoop();
root->unref();
delete eviewer;
return 0;
}
I know I miss some steps, but I can't find any tutorial for help. Hope you help me.
Thank you all in advance.