Need help with linking error

Hi everybody,

I have downloaded OCC 6.2 for windows with VC 2003 .NET, installed and complied it successfully (all the project in the $(casroot)/adm/win32 - folder. After doing this I tried to wirte a small program to see how OCC works, reading a IGES file and displaying the dimensions...I am able successfully compile the program without any errors but get a lot of linking errors !!!
(here is the code and the errors)

#include "stdafx.h"
#include "IGESControl_Reader.hxx"
#include "TColStd_HSequenceOfTransient.hxx"
#include "TopoDS_Shape.hxx"

int main()
{
IGESControl_Reader myIgesReader;
Standard_Integer nIgesFaces,nTransFaces;
myIgesReader.ReadFile ("bearing.iges");
//loads file MyFile.igs
Handle(TColStd_HSequenceOfTransient) myList = myIgesReader.GiveList("iges-faces");
//selects all IGES faces in the file and puts them into a list called //MyList,
nIgesFaces = myList->Length();
nTransFaces = myIgesReader.TransferList(myList);
//translates MyList,
cout TopoDS_Shape sh = myIgesReader.OneShape();
//and obtains the results in an Open CASCADE shape.
return (0);
}

-----------------------------------------------
errors
-------------------------------------------------
occ_ex.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)
occ_ex.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Standard_Storable::HashCode(int)const " (?HashCode@Standard_Storable@@UBEHH@Z)
occ_ex.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)
occ_ex.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)
occ_ex.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)
occ_ex.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall XSControl_Reader::NbRootsForTransfer(void)" (?NbRootsForTransfer@XSControl_Reader@@UAEHXZ)
occ_ex.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)
occ_ex.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)
occ_ex.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
occ_ex.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
occ_ex.obj : error LNK2019: unresolved external symbol "public: class Handle_TColStd_HSequenceOfTransient __thiscall XSControl_Reader::GiveList(char * const,char * const)" (?GiveList@XSControl_Reader@@QAE?AVHandle_TColStd_HSequenceOfTransient@@QAD0@Z) referenced in function _main
occ_ex.obj : error LNK2019: unresolved external symbol "public: enum IFSelect_ReturnStatus __thiscall XSControl_Reader::ReadFile(char * const)" (?ReadFile@XSControl_Reader@@QAE?AW4IFSelect_ReturnStatus@@QAD@Z) referenced in function _main
Debug/occ_ex.exe : fatal error LNK1120: 12 unresolved externals

I have linked all the libs in the $(casroot)/win32/libd (by adding them as additional dependieces in the linker options)......

I can't seem to figure where I am going wrong...can someone please help me out !!

Thanks :)

Regards,
Dheevatsa

TongXin's picture

Change "$(casroot)/win32/libd" for " $(casroot)/win32/lib "

Dheevatsa's picture

Hi,

I have tried this, even this doesn't help !!!
any other suggestions ??

P Dolbey's picture