Handle linking error in gcc

Hello,

i am using Red Hat 9 with gcc 3.2.3 and i want to compile a stand alone project (without installing OCC6.2.0). I use only the right headers and libraries with the following compiling flags:

/bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -O3 -I./occh/ -DHAVE_CONFIG_H -DHAVE_IOSTREAM_H -DHAVE_LIMITS_H -fexceptions -fPIC -L/home/alecz/projects/cmdbudmesh -fno-exceptions -fno-check-new -fexceptions -o cmdbudmesh vertex.o vectors.o vector.o (...) main.o -lTKBRep -lTKernel -lTKG2d -lTKG3d -lTKGeomAlgo -lTKGeomBase -lTKHLR -lTKMath -lTKMesh -lTKService -lTKTopAlgo -lTKV2d -lTKV3d

I have gained the following linking errors:

sat_interface.o(.text+0x597): In function `CreateBCurve(Handle_Geom_Curve const&, BCurve*&, double, double)':
: undefined reference to `Handle_Geom_Curve::~Handle_Geom_Curve [in-charge]()'
sat_interface.o(.text+0x77b): In function `CreateBCurve(Handle_Geom_Curve const&, BCurve*&, double, double)':
: undefined reference to `Handle_Geom_Curve::~Handle_Geom_Curve [in-charge]()'
sat_interface.o(.text+0x8a2): In function `CreateBCurve(Handle_Geom_Curve const&, BCurve*&, double, double)':
: undefined reference to `Handle_Geom_Curve::~Handle_Geom_Curve [in-charge]()'
sat_interface.o(.text+0x3b9e): In function `ProcessIntcurveCurve(char const*, long)':
: undefined reference to `Handle_Geom_Curve::~Handle_Geom_Curve [in-charge]()'
sat_interface.o(.text+0x3bac): In function `ProcessIntcurveCurve(char const*, long)':
: undefined reference to `Handle_Geom_Curve::~Handle_Geom_Curve [in-charge]()'
sat_interface.o(.text+0x3bfd): In function `ProcessIntcurveCurve(char const*, long)':
: undefined reference to `Handle_Geom_BSplineCurve::~Handle_Geom_BSplineCurve [in-charge]()'
sat_interface.o(.text+0x4500): In function `ProcessIntcurveCurve(char const*, long)':
: undefined reference to `Handle_Geom_BSplineCurve::~Handle_Geom_BSplineCurve [in-charge]()'
(...)

Any help would be appreciated.

Best regards. Sandor.

Venugopal Gudimetla's picture

Hi Biro,

looks like you didn't link with the object files resulting from compiling you source file(s) containing the classes Handle_Geom_Curve, Handle_Geom_BSplineCurve etc. you might have compiled them but might have forgotten to include them while linking? please check your makefile.
Venu

Biro Sandor's picture

Hi Venu,

Thank you very much for your help, it was a very interesting problem, this three header file wasn't in right place and so generate this fault.

Sandor.