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

Help! A make error with OpenCASCADE 6.1.0 and OpenCASCADE 6.2.0

John Hans's picture

Hello, everyone,

I caught a strange make error when I ran make on Fedora 10.
Originally, there was Open CASCADE version 6.1 in /opt/OpenCASCADE6.1.0 on my Fedora 10.
When I run my application in .sh created 1 years ago, it failed because of no on my computer. So, I decided to re-make it from my source code, I also got following errors:
/usr/bin/ld: warning:, needed by /opt/OpenCASCADE6.1.0/ros/lin/lib/, may conflict with
.obj/occview.o: In function `occview::init()':
occview.cpp:(.text+0xd24): undefined reference to `Standard::Allocate(unsigned int)'
collect2: ld returned 1 exit status
make: *** [project1] Error 1

I guessed the reason maybe from none I tried to install compat-libstdc++-33 and compat-libstdc++-296, and failed again when make with same error information. However, I had checked that there were already and on my computer, as following:
$ locate
$ locate

Then I installed OpenCASCADE 6.2.0 (version 6.2). This time, I could run successfully my application in .sh created before. I modified ~/.base_profile and .pro file to change OpenCASCADE6.1.0 to OpenCASCADE6.2.0, and re qmake to produce the new Makefile fiel. It is really pity that when I tried to make it, I failed again and got the error as following:
/usr/bin/ld: warning:, needed by /opt/OpenCASCADE6.2.0/ros/lin/lib/, may conflict with
.obj/moc_interactive.o: In function `~TopLoc_SListOfItemLocation':
/opt/OpenCASCADE6.1.0/ros/inc/TopLoc_SListOfItemLocation.hxx:87: undefined reference to `Handle_TopLoc_SListNodeOfSListOfItemLocation::~Handle_TopLoc_SListNodeOfSListOfItemLocation()'
.obj/moc_interactive.o: In function `~TopoDS_Shape':
/opt/OpenCASCADE6.1.0/ros/inc/TopoDS_Shape.hxx:67: undefined reference to `Handle_TopoDS_TShape::~Handle_TopoDS_TShape()'
obj/moc_selectPatch.o: In function `~TopoDS_Face':
/opt/OpenCASCADE6.1.0/ros/inc/TopoDS_Shape.hxx:67: undefined reference to `Handle_TopoDS_TShape::~Handle_TopoDS_TShape()'
collect2: ld returned 1 exit status
make: *** [ project1] Error 1

I was so surprise that when I check these error information, during make, the computer went to search include files in /opt/OpenCASCADE6.1.0, not /opt/OpenCASCADE6.2.0!
Following is some information relate to OpenCASCADE:

In ~/.bash_profile:
export CASROOT=/opt/OpenCASCADE6.2.0/ros
export OS_NAME=Linux
export PATH=/opt/OpenCASCADE6.2.0/3rdparty/$OS_NAME/tcltk/bin:$CASROOT/$OS_NAME/bin:$PATH
export LD_LIBRARY_PATH=/opt/OpenCASCADE6.2.0/3rdparty/$OS_NAME/tcltk/lib:$CASROOT/$OS_NAME/lib:/opt/OpenCASCADE6.2.0/3rdparty/Linux/qt:/opt/OpenCASCADE6.2.0/ros/lin/lib

In .pro file:

LIBS += -L/opt/OpenCASCADE6.2.0/ros/lin/lib -lTKernel -lTKV3d -lTKService -lTKSTEP -lTKSTEPBase -lTKBool -lTKOffset
INCLUDEPATH += /opt/OpenCASCADE6.2.0/ros/inc

There must be something uncorrect. I really do not know how to solve these strange errors. Could you do me a favor to give me some instructions.

Thank you very much in advance.