occ 6.2.0, qt-sample, linux

Dear forum members,
I have problems compiling the qt sample.
Does anyone has a solution for this problem?
I attach my configure and make output:

gernot@jupiter:/opt/OpenCASCADE6.2.0/samples/standard/qt$ ./configure --disable-qt-mt
checking for cc... cc
checking whether the C compiler (cc -DLIN -DLININTEL ) works... yes
checking whether the C compiler (cc -DLIN -DLININTEL ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether cc accepts -g... yes
checking for cl... no
checking for cc++... no
checking for CC... no
checking for cxx... no
checking for g++... g++
checking whether the C++ compiler (g++ -DLIN -DLININTEL ) works... yes
checking whether the C++ compiler (g++ -DLIN -DLININTEL ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether g++ accepts -g... yes
checking for bool... yes
checking how to run the C++ preprocessor... g++ -E
checking for X... libraries /usr/X11R6/lib, headers
checking for OpenGL... libraries /usr/lib, headers /usr/include
checking for Qt... libraries /usr/local/qt/lib, headers /usr/local/qt/include
checking for moc... /usr/local/qt/bin/moc
checking for msg2qm... /usr/local/qt/tools/msg2qm/msg2qm
checking for CasCade... libraries /opt/OpenCASCADE6.2.0/ros/Linux/lib, headers /opt/OpenCASCADE6.2.0/ros/inc
creating ./config.status
creating Makefile
creating config.Linux
gernot@jupiter:/opt/OpenCASCADE6.2.0/samples/standard/qt$

gernot@jupiter:/opt/OpenCASCADE6.2.0/samples/standard/qt$ make
make[1]: Betrete Verzeichnis '/opt/OpenCASCADE6.2.0/samples/standard/qt/adm/Linux'
g++ ../../src/Application.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/Application.o
g++ ../../src/Document.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/Document.o
../../src/Document.cxx: In member function `void Document::onColor()':
../../src/Document.cxx:168: Warnung: Übergabe von »Quantity_Parameter« für converting 1 von »void QColor::setRgb(int, int, int)«
../../src/Document.cxx:168: Warnung: Übergabe von »Quantity_Parameter« für converting 2 von »void QColor::setRgb(int, int, int)«
../../src/Document.cxx:168: Warnung: Übergabe von »Quantity_Parameter« für converting 3 von »void QColor::setRgb(int, int, int)«
g++ ../../src/Main.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/Main.o
g++ ../../src/MDIWindow.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/MDIWindow.o
g++ ../../src/Material.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/Material.o
g++ ../../src/Translate.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/Translate.o
g++ ../../src/Transparency.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/Transparency.o
g++ ../../src/View.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/View.o
../../src/View.cxx: In member function `void View::onBackground()':
../../src/View.cxx:846: Warnung: Übergabe von »Standard_Real« für converting 1 von »void QColor::setRgb(int, int, int)«
../../src/View.cxx:846: Warnung: Übergabe von »Standard_Real« für converting 2 von »void QColor::setRgb(int, int, int)«
../../src/View.cxx:846: Warnung: Übergabe von »Standard_Real« für converting 3 von »void QColor::setRgb(int, int, int)«
/usr/local/qt/bin/moc ../../src/Application.h -o ../../Linux/src/moc_Application.cxx
g++ ../../Linux/src/moc_Application.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/moc_Application.o
/usr/local/qt/bin/moc ../../src/Document.h -o ../../Linux/src/moc_Document.cxx
g++ ../../Linux/src/moc_Document.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/moc_Document.o
/usr/local/qt/bin/moc ../../src/MDIWindow.h -o ../../Linux/src/moc_MDIWindow.cxx
g++ ../../Linux/src/moc_MDIWindow.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/moc_MDIWindow.o
/usr/local/qt/bin/moc ../../src/Material.h -o ../../Linux/src/moc_Material.cxx
g++ ../../Linux/src/moc_Material.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/moc_Material.o
/usr/local/qt/bin/moc ../../src/Translate.h -o ../../Linux/src/moc_Translate.cxx
g++ ../../Linux/src/moc_Translate.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/moc_Translate.o
/usr/local/qt/bin/moc ../../src/Transparency.h -o ../../Linux/src/moc_Transparency.cxx
g++ ../../Linux/src/moc_Transparency.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/moc_Transparency.o
/usr/local/qt/bin/moc ../../src/View.h -o ../../Linux/src/moc_View.cxx
g++ ../../Linux/src/moc_View.cxx -c -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -I/usr/include -I/opt/OpenCASCADE6.2.0/ros/inc -I/opt/OpenCASCADE6.2.0/ros/src/WOKTclLib -I/usr/local/qt/include -o ../../Linux/obj/moc_View.o
g++ ../../Linux/obj/Application.o ../../Linux/obj/Document.o ../../Linux/obj/Main.o ../../Linux/obj/MDIWindow.o ../../Linux/obj/Material.o ../../Linux/obj/Translate.o ../../Linux/obj/Transparency.o ../../Linux/obj/View.o ../../Linux/obj/moc_Application.o ../../Linux/obj/moc_Document.o ../../Linux/obj/moc_MDIWindow.o ../../Linux/obj/moc_Material.o ../../Linux/obj/moc_Translate.o ../../Linux/obj/moc_Transparency.o ../../Linux/obj/moc_View.o -o ../../Linux/bin/IESample -L/usr/lib -L/opt/OpenCASCADE6.2.0/ros/Linux/lib -L/usr/local/qt/lib -L/usr/X11R6/lib -L/usr/X11R6/lib -lm -ldl -lc -lX11 -lXext -lXmu -lGL -lGLU -lqt -lpthread -lTKernel -lTKMath -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBool -lTKFeat -lTKFillet -lTKOffset -lTKHLR -lTKService -lTKV2d -lTKV3d -lTKMesh -lTKPCAF -lTKLCAF -lTKPLCAF -lTKCDF -lTKCAF -lPTKernel -lTKIGES -lTKSTEP -lTKSTEPBase -lTKSTEPAttr -lTKSTEP209 -lTKSTL -lTKVRML -lTKShHealing -lTKXSBase -lTKPShape -lTKShapeSchema -lTKOpenGl -lTKBO
/usr/bin/ld: warning: libstdc++.so.5, needed by /usr/lib/libTKernel.so, may conflict with libstdc++.so.6
../../Linux/obj/Document.o: In function `Standard_Transient::operator new(unsigned int)':Document.cxx:(.gnu.linkonce.t._ZN18Standard_TransientnwEj+0xd): undefined reference to `Standard::Allocate(unsigned int)'
../../Linux/obj/Translate.o: In function `Standard_ErrorHandler::~Standard_ErrorHandler()':Translate.cxx:(.gnu.linkonce.t._ZN21Standard_ErrorHandlerD1Ev+0xe): undefined reference to `Standard_ErrorHandler::Destroy()'
/opt/OpenCASCADE6.2.0/ros/Linux/lib/libTKService.so: undefined reference to `TCollection_AsciiString::TCollection_AsciiString(TCollection_ExtendedString const&, char)'
/opt/OpenCASCADE6.2.0/ros/Linux/lib/libTKGeomBase.so: undefined reference to `Standard_ErrorHandler::Error() const'
/opt/OpenCASCADE6.2.0/ros/Linux/lib/libTKMath.so: undefined reference to `Standard_Failure::Standard_Failure(Standard_Failure const&)'
/opt/OpenCASCADE6.2.0/ros/Linux/lib/libTKGeomBase.so: undefined reference to `Standard_Failure::Reraise()'
/opt/OpenCASCADE6.2.0/ros/Linux/lib/libTKGeomBase.so: undefined reference to `Standard_Failure::Standard_Failure(Standard_Failure const&)'
/opt/OpenCASCADE6.2.0/ros/Linux/lib/libTKPCAF.so: undefined reference to `StandardCSFDB_Allocate(unsigned int)'
/opt/OpenCASCADE6.2.0/ros/Linux/lib/libTKMath.so: undefined reference to `Standard_Failure::Destroy()'
/opt/OpenCASCADE6.2.0/ros/Linux/lib/libTKXSBase.so: undefined reference to `Standard_Type::SubType(char*) const'
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [../../Linux/bin/IESample] Fehler 1
make[1]: Verlasse Verzeichnis '/opt/OpenCASCADE6.2.0/samples/standard/qt/adm/Linux'
make: *** [all] Fehler 2
gernot@jupiter:/opt/OpenCASCADE6.2.0/samples/standard/qt$

My system is kubuntu 6.06.
Thank you for any hints,
Gernot Knieling

Umar Said's picture

It compiles well on my computer. Maybe the installation of your OpenCascade not completed so some library files are missing. Find out what library provides the required classes to link. Then make sure your program link against the library.

Gernot Knieling's picture

Hello,
thank you for your answer,
do you know any method to check which library is missing?

Umar Said's picture