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

Iges file reading link error

Anup's picture
Forums: 

Hi i am trying to run this following code to read an iges file and displaying it, i am new to opencascade.
#include "IGESControl_Reader.hxx"
#include "TColStd_HSequenceOfTransient.hxx"
#include "TopoDS_Shape.hxx"
#include
#include
#define OCCGEOMETRY
using namespace std;

int main()
{
IGESControl_Reader MyReader;
Standard_Integer nIgesFaces,nTransFaces;
MyReader.ReadFile("H:/Female HBM Model bones/FEMUR_V2_1.igs");

//loads file FEMUR_V2_1.igs
Handle (TColStd_HSequenceOfTransient) myList = MyReader.GiveList ("pure-faces");

nIgesFaces = myList-> Length ();
nTransFaces = MyReader.TransferList(myList);
cout printf("\n\nThe file was successfully read\n\n");

TopoDS_Shape MyShape = MyReader.OneShape();
}

But i am getting the following link errors

1>main.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall Standard_Storable::Delete(void)" (?Delete@Standard_Storable@@UAEXXZ) referenced in function "public: virtual __thiscall Standard_Storable::~Standard_Storable(void)" (??1Standard_Storable@@UAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Standard_Storable::HashCode(int)const " (?HashCode@Standard_Storable@@UBEHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Standard_Storable::ShallowDump(class std::basic_ostream > &)const " (?ShallowDump@Standard_Storable@@UBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: static void __cdecl Standard::Free(void * &)" (?Free@Standard@@SAXAAPAX@Z) referenced in function "public: static void __cdecl Standard_Storable::operator delete(void *)" (??3Standard_Storable@@SAXPAX@Z)
1>main.obj : error LNK2019: unresolved external symbol "private: void __thiscall Handle_Standard_Transient::EndScope(void)" (?EndScope@Handle_Standard_Transient@@AAEXXZ) referenced in function "public: __thiscall Handle_Standard_Transient::~Handle_Standard_Transient(void)" (??1Handle_Standard_Transient@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall XSControl_Reader::NbRootsForTransfer(void)" (?NbRootsForTransfer@XSControl_Reader@@UAEHXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall TColStd_SequenceOfTransient::Clear(void)" (?Clear@TColStd_SequenceOfTransient@@QAEXXZ) referenced in function "public: __thiscall TColStd_SequenceOfTransient::~TColStd_SequenceOfTransient(void)" (??1TColStd_SequenceOfTransient@@QAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall TopTools_SequenceOfShape::Clear(void)" (?Clear@TopTools_SequenceOfShape@@QAEXXZ) referenced in function "public: __thiscall TopTools_SequenceOfShape::~TopTools_SequenceOfShape(void)" (??1TopTools_SequenceOfShape@@QAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall Standard_Type::Print(class std::basic_ostream > &)const " (?Print@Standard_Type@@QBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "public: void __thiscall Standard_Type::operator > &)const " (??6Standard_Type@@QBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: class TopoDS_Shape __thiscall XSControl_Reader::OneShape(void)const " (?OneShape@XSControl_Reader@@QBE?AVTopoDS_Shape@@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: int __thiscall XSControl_Reader::TransferList(class Handle_TColStd_HSequenceOfTransient const &)" (?TransferList@XSControl_Reader@@QAEHABVHandle_TColStd_HSequenceOfTransient@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: class Handle_TColStd_HSequenceOfTransient __thiscall XSControl_Reader::GiveList(char const * const,char const * const)" (?GiveList@XSControl_Reader@@QAE?AVHandle_TColStd_HSequenceOfTransient@@QBD0@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: enum IFSelect_ReturnStatus __thiscall XSControl_Reader::ReadFile(char const * const)" (?ReadFile@XSControl_Reader@@QAE?AW4IFSelect_ReturnStatus@@QBD@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall IGESControl_Reader::IGESControl_Reader(void)" (??0IGESControl_Reader@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall TopLoc_SListOfItemLocation::Clear(void)" (?Clear@TopLoc_SListOfItemLocation@@QAEXXZ) referenced in function "public: __thiscall TopLoc_SListOfItemLocation::~TopLoc_SListOfItemLocation(void)" (??1TopLoc_SListOfItemLocation@@QAE@XZ)
1>G:\My Test\IGES_2\Debug\IGES_2.exe : fatal error LNK1120: 15 unresolved externals
1>Build log was saved at "file://g:\My Test\IGES_2\IGES_2\Debug\BuildLog.htm"
1>IGES_2 - 16 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Can anybody please help me?????????????????????????????????????????????????

i hav included following libaries also......
"$(casroot)/win32/lib";C:\OpenCASCADE6.6.0\ros\inc;"C:\OpenCASCADE6.6.0\ros\drv\*.lib";"C:\OpenCASCADE6.6.0\3rdparty\tcltk-85-32\*.lib";"C:\OpenCASCADE6.6.0\ros\win32\vc9\*.libd";"C:\OpenCASCADE6.6.0\ros\win32\vc9\*.lib""..\..\..\..\3rdparty\qt462-vc9-32\include\QtCore";"..\..\..\..\3rdparty\qt462-vc9-32\include\QtGui";"..\..\..\..\3rdparty\qt462-vc9-32\include\Qt3Support";"..\..\..\..\3rdparty\qt462-vc9-32\include";..\Common\src;..\Interface\src;"..\..\..\..\3rdparty\tcltk-85-32\include";"..\..\..\..\3rdparty\freetype-2.4.10-vc9-32\include";"..\..\..\..\3rdparty\freeimage-vc9-32\include";"..\..\..\..\3rdparty\gl2ps-1.3.5-vc9-32\include";..\..\..\..\3rdparty\tbb30_018oss\include;"..\..\..\..\3rdparty\qt462-vc9-32\include\Qt";"..\..\..\..\3rdparty\qt462-vc9-32\include\QtCore";"c:\OpenCASCADE6.6.0\ros\..\3rdparty\jdk1.6.0-32\include";"c:\OpenCASCADE6.6.0\ros\..\3rdparty\jdk1.6.0-32\include\win32";..\..\..\inc;"..\..\..\..\3rdparty\qt462-vc9-32\include\ActiveQt";win32\vc9\srcd;"..\..\..\..\3rdparty\qt462-vc9-32\mkspecs\default"

Still getting those errors....