Standard class linking error?!

Hello,

I am trying to compile a OCC6.2 project in Open Suse 10.3 Linux. When i link the code give some linking error and i didn't know how to solve. Please help me out.

Here the linking errors:

/home/alecz/Projects/OCC_proba/src/sat_interface.cxx:313: undefined reference to `TColStd_Array1OfReal::TColStd_Array1OfReal(int, int)'
/home/alecz/Projects/OCC_proba/src/sat_interface.cxx:314: undefined reference to `TColStd_Array1OfInteger::TColStd_Array1OfInteger(int, int)'
/home/alecz/Projects/OCC_proba/src/sat_interface.cxx:323: undefined reference to `TColgp_Array1OfPnt::TColgp_Array1OfPnt(int, int)'
/home/alecz/Projects/OCC_proba/src/sat_interface.cxx:324: undefined reference to `TColStd_Array1OfReal::TColStd_Array1OfReal(int, int)'
sat_interface.o: In function `TColStd_Array1OfInteger::operator new(unsigned int)':
/home/alecz/OpenCASCADE6.2.0/ros/inc/TColStd_Array1OfInteger.hxx:58: undefined reference to `Standard::Allocate(unsigned int)'
sat_interface.o: In function `TColgp_Array1OfPnt::operator new(unsigned int)':
/home/alecz/OpenCASCADE6.2.0/ros/inc/TColgp_Array1OfPnt.hxx:58: undefined reference to `Standard::Allocate(unsigned int)'
sat_interface.o: In function `TColStd_Array1OfReal::operator new(unsigned int)':
/home/alecz/OpenCASCADE6.2.0/ros/inc/TColStd_Array1OfReal.hxx:61: undefined reference to `Standard::Allocate(unsigned int)'
sat_interface.o: In function `TColStd_Array1OfInteger::operator delete(void*)':
/home/alecz/OpenCASCADE6.2.0/ros/inc/TColStd_Array1OfInteger.hxx:62: undefined reference to `Standard::Free(void*&)'
sat_interface.o: In function `TColgp_Array1OfPnt::operator delete(void*)':
/home/alecz/OpenCASCADE6.2.0/ros/inc/TColgp_Array1OfPnt.hxx:62: undefined reference to `Standard::Free(void*&)'
sat_interface.o: In function `TColStd_Array1OfReal::operator delete(void*)':
/home/alecz/OpenCASCADE6.2.0/ros/inc/TColStd_Array1OfReal.hxx:65: undefined reference to `Standard::Free(void*&)'
collect2: ld returned 1 exit status

Best regards. Sandor.

Torsten Sadowski's picture

Hello Sandor,

do you have -lTKernel in your linker command line?
Could you give me the command line

Torsten

Biro Sandor's picture

Hello Torsen.

Thank you very much to help me out.
Here is the linker command line:
g++ -O0 -g3 -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DNDEBUG -DHAVE_WOK_CONFIG_H -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DNDEBUG -DHAVE_WOK_CONFIG_H -o occ_proba AnisotropicMaterial.o BExt.o BUD_Init_50.o BUD_Mesh_50.o BUtils.o CoarseMesh.o CompositeMaterial.o Constraint.o ConstraintAttr.o ContactAttr.o DisplacementAttr.o ElemIDAttr.o EntityArray.o FineMesh.o FineMeshUtils.o Function.o GYAttr.o GeomAttr.o GroupAttr.o HistoryAttr.o HyperelasticMaterial.o InfoAttr.o IsotropicMaterial.o LibDefinition.o Material.o MaterialAttr.o NodeIDAttr.o Optimise.o OrthotropicMaterial.o PosGeomAttr.o PressureAttr.o Property.o PropertyAttr.o RefinementAttr.o SATControl_Reader.o SettingsAttr.o ShapeAttr.o SideAttr.o SpecificMaterial.o SpecificProperty.o SplitEnts.o StrCut.o Tree.o TypeAttr.o angles.o api.o attrib.o body.o bool.o box.o curve.o data_err.o dcl_data.o dcl_init.o dcl_math.o dcl_mesh.o dcl_meshtools.o dist.o edge.o entity.o entitylist.o face.o geometry.o ginters.o inters.o line.o lump.o matrix3d.o mesh_err.o minmax.o msg_list.o msg_load.o my_msg_load.o occ_proba.o part.o plane.o point.o pos.o rw_common_attr.o rw_main.o sat_entities.o sat_interface.o shell.o unitvector.o ur_main.o utils.o vector.o vectors.o vertex.o -lTKernel -L/home/alecz/OpenCASCADE6.2.0/ros/lin/lib

I think, i must give all library what i'm want to use in my project.

Sandor.

Biro Sandor's picture

Thank you very much. It's working.

Best regards. Sandor.