For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

opencascade with Qt4

Srinivasan Bhaskaran's picture
Forums: 

Hi,
I would like to use opencascade 6.3 with Qt4. I check the QtOccharness0.1. But whenever I run the code I get the following error

i915_program_error: Bad inst->DstReg.Index: 2
i915_program_error: Bad inst->DstReg.Index: 3
Segmentation fault

Any help would be appreciated. I use Ubuntu 10.10 KDE version with Qt 4.7

Srinivasan.B

P Dolbey's picture

QtOCCHarness is pretty onld now - it was written at time when there was no pure Qt4 solution for OCC 6.2. There is later code in the svn site at sourceforge.

However, I'd recommend that you try the Qt4 sample that came with OCCT 6.3.0 first and see how that works.

Pete

Srinivasan Bhaskaran's picture

Hi,
I downloaded the latest version of the code from SVN site at sourceforge. However I am unable to get the code to compile. When I compile the code I get the following error.

g++ -c -pipe -ffriend-injection -m64 -O2 -D_REENTRANT -Wall -W -DCSFDB -DQOCC_STATIC -DLIN -DLININTEL -DHAVE_CONFIG_H -DHAVE_IOSTREAM -DHAVE_FSTREAM -DHAVE_LIMITS_H -D_OCC64 -DSALOME_GEOM -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -Iinc -Isrc/lib -Isrc/ocaf -Isrc/util -Isrc/qocc -I/usr/include/opencascade -I/usr/local/include -I/inc -I/inc -I/usr/X11R6/include -Irelease -o release/qoccinputoutput.o src/qocc/qoccinputoutput.cpp
src/qocc/qoccinputoutput.cpp:51: fatal error: XSDRAWSTLVRML_DataSource.hxx: No such file or directory

I have compiled this with OCC 6.3 on Linux Mint 10 64bit (KDE Version). The version of Qt which I use is 4.7.0

I also have OCC version 6.5 installed in my machine. When I compile it with this version of OCC I get the following error.

make -f Makefile.Release all
make[1]: Entering directory `/home/srinivasan/Downloads/qtocc/trunk/qtgeom'
g++ -c -pipe -ffriend-injection -m64 -O2 -D_REENTRANT -Wall -W -DCSFDB -DQOCC_STATIC -DLIN -DLININTEL -DHAVE_CONFIG_H -DHAVE_IOSTREAM -DHAVE_FSTREAM -DHAVE_LIMITS_H -D_OCC64 -DSALOME_GEOM -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -Iinc -Isrc/lib -Isrc/ocaf -Isrc/util -Isrc/qocc -I../../../../opencascade650 -I/usr/local/include -I/home/srinivasan/opencascade650/inc -I/inc -I/usr/X11R6/include -Irelease -o release/main.o src/main/main.cpp
In file included from /usr/local/include/GEOM_Object.hxx:128,
from inc/qocc.h:93,
from inc/qoccapplication.h:40,
from src/main/main.cpp:43:
/usr/local/include/GEOM_Engine.hxx:28: fatal error: Interface_DataMapOfIntegerTransient.hxx: No such file or directory
compilation terminated.
make[1]: *** [release/main.o] Error 1
make[1]: Leaving directory `/home/srinivasan/Downloads/qtocc/trunk/qtgeom'
make: *** [release-all] Error 2

Srinivasan.B

Venugopal Gudimetla's picture

Hi did you link it with Geom Module ?
http://sourceforge.net/projects/salomegeometry/
Venu

Srinivasan Bhaskaran's picture

Hi,

I got the geom module and compiled and installed it in the /usr/local folder. But as you can see from the error message it fails even in the compilation stage itself.

Srinivasan.B

Venugopal Gudimetla's picture

I think the reason is Interface_DataMapOfIntegerTransient.hxx could be deprecated and doesn't exist in 6.5.0. Geom module may be is linked using 6.3.0.

Fotis Sioutis's picture

Check out the latest svn trunk version of GEOM and recompile against OCC 6.5 in order to bypass GEOM issues.For the qtgeom problem propably you have an installation of OCC which lacks DRAW package which is needed for the stl importing feature.

Fotis

Fotis Sioutis's picture

To be correct and precise Draw is a module and not a package in OCC terms.

Srinivasan Bhaskaran's picture

Hi,
In which package do I get the Draw module in Ubuntu 10.10. I have installed all the opencascade modules. Thanks in advance for you help

Srinivasan.B

Srinivasan Bhaskaran's picture

Hi,
In ubuntu 10.10 I am able to see the opencascade-draw package for OCC 6.3 but I am unable to see the opencascade-draw-dev package which contains the headers. May be I will have to recompile geom with OCC 6.5 which and then try compiling qtocc after that.

Srinivasan.B

Srinivasan Bhaskaran's picture

Hi,
Now I am compiling GEOM module with OCC 6.5. When I do this I get the same error as given in my earlier posting.

make all-am
make[1]: Entering directory `/home/srinivasan/Downloads/geom-5.1.2.7/adm/lin'
/bin/bash ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/home/srinivasan/opencascade650/inc -I./inc/ -I./src/GEOMAlgo -I./src/BlockFix -I./src/GEOM -I./src/NMTTools -I./src/NMTDS -I/home/srinivasan/opencascade650 -D_OCC64 -g -O2 -MT GEOMImpl_3DSketcherDriver.lo -MD -MP -MF .deps/GEOMImpl_3DSketcherDriver.Tpo -c -o GEOMImpl_3DSketcherDriver.lo `test -f './src/GEOMImpl/GEOMImpl_3DSketcherDriver.cpp' || echo './'`./src/GEOMImpl/GEOMImpl_3DSketcherDriver.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/home/srinivasan/opencascade650/inc -I./inc/ -I./src/GEOMAlgo -I./src/BlockFix -I./src/GEOM -I./src/NMTTools -I./src/NMTDS -I/home/srinivasan/opencascade650 -D_OCC64 -g -O2 -MT GEOMImpl_3DSketcherDriver.lo -MD -MP -MF .deps/GEOMImpl_3DSketcherDriver.Tpo -c ./src/GEOMImpl/GEOMImpl_3DSketcherDriver.cpp -fPIC -DPIC -o .libs/GEOMImpl_3DSketcherDriver.o
In file included from ./inc/GEOM_IOperations.hxx:24,
from ./inc/GEOMImpl_IMeasureOperations.hxx:25,
from ./src/GEOMImpl/GEOMImpl_3DSketcherDriver.cpp:28:
./inc/GEOM_Engine.hxx:28: fatal error: Interface_DataMapOfIntegerTransient.hxx: No such file or directory
compilation terminated.
make[1]: *** [GEOMImpl_3DSketcherDriver.lo] Error 1
make[1]: Leaving directory `/home/srinivasan/Downloads/geom-5.1.2.7/adm/lin'
make: *** [all] Error 2

Srinivasan.B

Fotis Sioutis's picture

You must checkout latest svn trunk of GEOM in order to compile against occ 6.5

Fotis

Srinivasan Bhaskaran's picture

Hi,
I had recompiled svn verion of GEOM against OCC 6.5. Now when I try to compile qtocc (latest version from SVN) I get the following link error.

make -f Makefile.Release all
make[1]: Entering directory `/home/srinivasan/Downloads/qtocc/trunk/qtgeom'
g++ -Wl,-O1 -o qtgeom release/main.o release/qoccapplication.o release/qocccontroller.o release/qoccframe.o release/qocc3dwidget.o release/qoccinputoutput.o release/qoccdocument.o release/qoccmainwindow.o release/qoccmakebottle.o release/qocctreewidget.o release/qocccommand.o release/qocccmdpoint.o release/qocccmdcircle2pt.o release/qocccmdline2pt.o release/treeutils.o release/moc_qoccapplication.o release/moc_qocccontroller.o release/moc_qocc3dwidget.o release/moc_qoccframe.o release/moc_qoccinputoutput.o release/moc_qoccdocument.o release/moc_qoccmainwindow.o release/moc_qocctreewidget.o release/moc_qocccommand.o release/moc_qocccmdpoint.o release/moc_qocccmdcircle2pt.o release/moc_qocccmdline2pt.o release/qrc_qocc.o -L/usr/X11R6/lib -L/usr/lib -lTKernel -lTKMath -lTKAdvTools -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBO -lTKBool -lTKHLR -lTKFillet -lTKOffset -lTKFeat -lTKMesh -lPTKernel -lTKPShape -lTKShapeSchema -lTKShHealing -lTKService -lTKV2d -lTKV3d -lTKOpenGl -lTKMeshVS -lTKXSDRAW -lTKCDF -lTKLCAF -lTKCAF -lTKBinL -lTKXmlL -lTKPLCAF -lTKBin -lTKXml -lTKPCAF -lFWOSPlugin -lTKStdLSchema -lTKStdSchema -lStdPlugin -lXmlPlugin -lBinPlugin -lStdLPlugin -lBinLPlugin -lXmlLPlugin -lTKXSBase -lTKSTEPBase -lTKSTEPAttr -lTKSTEP209 -lTKSTEP -lTKIGES -lTKXCAF -lTKXCAFSchema -lTKXDEIGES -lTKXDESTEP -lTKSTL -lTKVRML -lTKXmlXCAF -lTKBinXCAF -lXCAFPlugin -lXmlXCAFPlugin -lBinXCAFPlugin -L/home/srinivasan/opencascade650/Linux/lib -L/home/srinivasan/opencascade650/../3rdparty/Linux/tcltk/lib/ -ltk8.5 -lXmu -L/Linux/lib -ltk8.5 -lXmu -lArchimede -lExchangeBREP -lExchangeIGES -lExchangeSTEP -lExchangeSTL -lExchangeCSFDB -lExchangeVRML -lNMTDS -lNMTTools -lPartition -lShHealOper -lSketcher -lGEOM -lGEOMAlgo -lGEOMImpl -lGLU -lGL -lQtGui -lQtCore -lpthread
/home/srinivasan/opencascade650/Linux/lib/libTKXSDRAW.so: undefined reference to `MeshVS_DataSource::GetDetectedEntities(Handle_MeshVS_Mesh const&, double, double, double, Handle_TColStd_HPackedMapOfInteger&, Handle_TColStd_HPackedMapOfInteger&, double&)'
//usr/local/lib/libGEOM.so: undefined reference to `TDataStd_ByteArray::ChangeArray(Handle_TColStd_HArray1OfByte const&, unsigned int)'
collect2: ld returned 1 exit status
make[1]: *** [qtgeom] Error 1
make[1]: Leaving directory `/home/srinivasan/Downloads/qtocc/trunk/qtgeom'
make: *** [release-all] Error 2

Srinivasan.B

Venugopal Gudimetla's picture

Did you check if TDataStd_ByteArray::ChangeArray() is deprecated in 6.5.0?

Srinivasan Bhaskaran's picture

Hi,
Finally I managed to compile the importexport sample provided in OCC 6.5.0 with QtCreator. I am able to open the application, but when I click on the new document command it crashes with the following error message

QCursor: Cannot create bitmap cursor; invalid bitmap(s)
QCursor: Cannot create bitmap cursor; invalid bitmap(s)
i915_program_error: Bad inst->DstReg.Index: 2
i915_program_error: Bad inst->DstReg.Index: 3
Segmentation fault

I am also attaching the project file which I had used for the compilation process with QtCreator

Srinivasan Bhaskaran's picture

Hi,
Forgotten the attachment importexport.tar.gz

Attachments: 
Srinivasan Bhaskaran's picture

Hi,

Can anyone help me out? I am desperately trying to understand the usage of opencascade with qt4.

Srinivasan.B

Johannes Eckstein's picture

Hi

Srinivasan, Did you understand your opencascade qt4 issue?

Sorry for hijacking this thread but you seam to have built opencascade on ubuntu maverick-meerkat

I am trying to compile and build opencascade on maverick meerkat 64 bit

I did ./configure $flags --prefix=/opt/opencascade

when i afterwards do: make
then it compiles and afterwards links but then i get:

if /bin/sh ../../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/lib/include -DHAVE_GL2PS -I../../../inc -I../../../drv/OpenGl -I../../../src/OpenGl -D_OCC64 -m64 -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT OpenGl_FontMgr.lo -MD -MP -MF ".deps/OpenGl_FontMgr.Tpo" \
-c -o OpenGl_FontMgr.lo `test -f '../../../src/OpenGl/OpenGl_FontMgr.cxx' || echo './'`../../../src/OpenGl/OpenGl_FontMgr.cxx; \
then mv ".deps/OpenGl_FontMgr.Tpo" ".deps/OpenGl_FontMgr.Plo"; \
else rm -f ".deps/OpenGl_FontMgr.Tpo"; exit 1; \
fi
g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/lib/include -DHAVE_GL2PS -I../../../inc -I../../../drv/OpenGl -I../../../src/OpenGl -D_OCC64 -m64 -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT OpenGl_FontMgr.lo -MD -MP -MF .deps/OpenGl_FontMgr.Tpo -c ../../../src/OpenGl/OpenGl_FontMgr.cxx -fPIC -DPIC -o OpenGl_FontMgr.lo
In file included from ../../../src/OpenGl/OpenGl_FontMgr.cxx:1:
../../../inc/OpenGl_FontMgr.hxx:10: fatal error: FTFont.h: No such file or directory
compilation terminated.

What is this OpenGl_FontMgr.hxx and which package provides FTFont.h ?

Jendrik Seiler's picture

Just in case someone stumbles across this thread having the same problem: FTFont.h is part of the FTGL package which is required for OCC (along with freetype)

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.