| [gilles@localhost essai]$ g++ -o
essai.exe essai.cpp In file included from essai.cpp:1: /usr/include/Inventor/Qt/SoQt.h:35:21: qobject.h: No such file or directory In file included from essai.cpp:1: /usr/include/Inventor/Qt/SoQt.h:66: error: expected `;' before '*' token /usr/include/Inventor/Qt/SoQt.h:67: error: expected `;' before '*' token /usr/include/Inventor/Qt/SoQt.h:69: error: `QWidget' has not been declared /usr/include/Inventor/Qt/SoQt.h:75: error: expected `;' before '*' token /usr/include/Inventor/Qt/SoQt.h:76: error: expected `;' before '*' token /usr/include/Inventor/Qt/SoQt.h:78: error: `QWidget' has not been declared /usr/include/Inventor/Qt/SoQt.h:79: error: `QWidget' has not been declared /usr/include/Inventor/Qt/SoQt.h:81: error: `QWidget' has not been declared /usr/include/Inventor/Qt/SoQt.h:82: error: expected `,' or `...' before '*' token /usr/include/Inventor/Qt/SoQt.h:84: error: `QWidget' has not been declared essai.cpp: In function `int main(int, char**)': essai.cpp:46: error: no matching function for call to `SoQt::init(char*&)' /usr/include/Inventor/Qt/SoQt.h:69: note: candidates are: static void SoQt::init(int*) essai.cpp:72: error: no matching function for call to `SoQt::show(QWidget*&)' /usr/include/Inventor/Qt/SoQt.h:78: note: candidates are: static void SoQt::show(int*) |
| [gilles@localhost essai]$ qmake
-project [gilles@localhost essai]$ qmake [gilles@localhost essai]$ make g++ -c -pipe -Wall -W -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I. -I/usr/lib/qt3//include -o essai.o essai.cpp g++ -o essai essai.o -L/usr/lib/qt3//lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm essai.o(.text+0x2a): In function `main': : undefined reference to `SoQt::init(char const*, char const*)' essai.o(.text+0x43): In function `main': : undefined reference to `SoSeparator::SoSeparator()' essai.o(.text+0x4b): In function `main': : undefined reference to `SoBase::ref() const' essai.o(.text+0x62): In function `main': : undefined reference to `SoPerspectiveCamera::SoPerspectiveCamera()' essai.o(.text+0x8a): In function `main': : undefined reference to `SoDirectionalLight::SoDirectionalLight()' essai.o(.text+0xb0): In function `main': : undefined reference to `SoSeparator::SoSeparator()' essai.o(.text+0xc7): In function `main': : undefined reference to `SoGroup::SoGroup()' essai.o(.text+0xde): In function `main': : undefined reference to `SoRotor::SoRotor()' essai.o(.text+0x10d): In function `main': : undefined reference to `SbVec3f::SbVec3f(float, float, float)' essai.o(.text+0x125): In function `main': : undefined reference to `SbRotation::SbRotation(SbVec3f const&, float)' essai.o(.text+0x131): In function `main': : undefined reference to `SoSFRotation::setValue(SbRotation const&)' essai.o(.text+0x15f): In function `main': : undefined reference to `SoCube::SoCube()' essai.o(.text+0x187): In function `main': : undefined reference to `SoTrackballManip::SoTrackballManip()' essai.o(.text+0x1b0): In function `main': : undefined reference to `SoArray::SoArray()' essai.o(.text+0x1d1): In function `main': : undefined reference to `SoSFEnum::setValue(int)' essai.o(.text+0x200): In function `main': : undefined reference to `SoSFShort::setValue(short)' essai.o(.text+0x217): In function `main': : undefined reference to `SoSFShort::setValue(short)' essai.o(.text+0x239): In function `main': : undefined reference to `SbVec3f::SbVec3f(float, float, float)' essai.o(.text+0x24b): In function `main': : undefined reference to `SoSFVec3f::setValue(SbVec3f const&)' essai.o(.text+0x26d): In function `main': : undefined reference to `SbVec3f::SbVec3f(float, float, float)' essai.o(.text+0x27f): In function `main': : undefined reference to `SoSFVec3f::setValue(SbVec3f const&)' essai.o(.text+0x2eb): In function `main': : undefined reference to `SoQtRenderArea::SoQtRenderArea(QWidget*, char const*,int, int, int)' essai.o(.text+0x2f9): In function `main': : undefined reference to `SoQtRenderArea::getViewportRegion() const' essai.o(.text+0x318): In function `main': : undefined reference to `SoCamera::viewAll(SoNode*, SbViewportRegion const&, float)' essai.o(.text+0x34a): In function `main': : undefined reference to `SbColor::SbColor(float, float, float)' essai.o(.text+0x359): In function `main': : undefined reference to `SoQtRenderArea::setBackgroundColor(SbColor const&)' essai.o(.text+0x39e): In function `main': : undefined reference to `SoQtExaminerViewer::SoQtExaminerViewer(QWidget*, charconst*, int, SoQtFullViewer::BuildFlag, SoQtViewer::Type)' essai.o(.text+0x3bb): In function `main': : undefined reference to `SoQtComponent::setTitle(char const*)' essai.o(.text+0x3ce): In function `main': : undefined reference to `SoQt::show(QWidget*)' essai.o(.text+0x3d3): In function `main': : undefined reference to `SoQt::mainLoop()' essai.o(.text+0x3e6): In function `main': : undefined reference to `SoBase::unref() const' essai.o(.text+0x473): In function `main': : undefined reference to `SoQtComponent::setTitle(char const*)' essai.o(.text+0x488): In function `main': : undefined reference to `SoQtComponent::setIconTitle(char const*)' collect2: ld returned 1 exit status make: *** [essai] Erreur 1 |
| ###################################################################### # Automatically generated by qmake (1.07a) Thu Jul 28 11:39:14 2005 ###################################################################### TEMPLATE = app CONFIG -= moc INCLUDEPATH += . # Input SOURCES += essai.cpp |
| INCLUDEPATH +=
/usr/local/coin/include /usr/local/soqt/include LIBS += -L/usr/local/coin/lib -lCoin -L/usr/local/soqt/lib -lSoQt |
| [gilles@localhost essai]$ make g++ -o essai essai.o -L/usr/lib/qt3//lib -L/usr/X11R6/lib -L/usr/local/coin/lib -lCoin -L/usr/local/soqt/lib -lSoQt -lqt-mt -lXext -lX11 -lm |
| LIBS += -lCoin -lSoQt |
| [gilles@localhost essai]$ g++ -c -o essai.o essai.cpp
-I/usr/lib/qt3/include/ [gilles@localhost essai]$ g++ -o essai.exe essai.cpp -lCoin -lSoQt -I/usr/lib/qt3/include/ |
| *e= * |