您好,我在进行学习occ实体创建的时候尝试使用他所给的那个瓶子的代码“src/MakeBottle.cxx”想生成出来一个瓶子,但是在编译的过程中出现一些问题。
1>Bottle.obj : error LNK2019: 无法解析的外部符号 "public: void __cdecl ChFiDS_ListOfStripe::Clear(void)" (?Clear@ChFiDS_ListOfStripe@@QEAAXXZ),该符号在函数 "public: __cdecl ChFiDS_ListOfStripe::~ChFiDS_ListOfStripe(void)" (??1ChFiDS_ListOfStripe@@QEAA@XZ) 中被引用
1>Bottle.obj : error LNK2019: 无法解析的外部符号 "public: __cdecl ChFiDS_IndexedDataMapOfVertexListOfStripe::ChFiDS_IndexedDataMapOfVertexListOfStripe(int)" (??0ChFiDS_IndexedDataMapOfVertexListOfStripe@@QEAA@H@Z),该符号在函数 "public: void __cdecl ChFiDS_IndexedDataMapOfVertexListOfStripe::`default constructor closure'(void)" (??_FChFiDS_IndexedDataMapOfVertexListOfStripe@@QEAAXXZ) 中被引用
1>Bottle.obj : error LNK2019: 无法解析的外部符号 "public: void __cdecl ChFiDS_IndexedDataMapOfVertexListOfStripe::Clear(void)" (?Clear@ChFiDS_IndexedDataMapOfVertexListOfStripe@@QEAAXXZ),该符号在函数 "public: __cdecl ChFiDS_IndexedDataMapOfVertexListOfStripe::~ChFiDS_IndexedDataMapOfVertexListOfStripe(void)" (??1ChFiDS_IndexedDataMapOfVertexListOfStripe@@QEAA@XZ) 中被引用
1>Bottle.obj : error LNK2019: 无法解析的外部符号 "public: void __cdecl ChFiDS_Regularities::Clear(void)" (?Clear@ChFiDS_Regularities@@QEAAXXZ),该符号在函数 "public: __cdecl ChFiDS_Regularities::~ChFiDS_Regularities(void)" (??1ChFiDS_Regularities@@QEAA@XZ) 中被引用
1>Bottle.obj : error LNK2019: 无法解析的外部符号 "public: virtual void __cdecl ChFi3d_Builder::Delete(void)" (?Delete@ChFi3d_Builder@@UEAAXXZ),该符号在函数 "public: virtual __cdecl ChFi3d_Builder::~ChFi3d_Builder(void)" (??1ChFi3d_Builder@@UEAA@XZ) 中被引用
1>Bottle.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __cdecl ChFi3d_Builder::SimulSurf(class Handle_ChFiDS_SurfData &,class Handle_ChFiDS_HElSpine const &,class Handle_ChFiDS_Spine const &,int,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,class Handle_BRepAdaptor_HCurve2d const &,class Handle_BRepAdaptor_HSurface const &,class Handle_BRepAdaptor_HCurve2d const &,unsigned int &,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,enum TopAbs_Orientation,double,double,double &,double &,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,class math_Vector const &)" (?SimulSurf@ChFi3d_Builder@@MEAAXAEAVHandle_ChFiDS_SurfData@@AEBVHandle_ChFiDS_HElSpine@@AEBVHandle_ChFiDS_Spine@@HAEBVHandle_BRepAdaptor_HSurface@@AEBVHandle_Adaptor3d_TopolTool@@AEBVHandle_BRepAdaptor_HCurve2d@@35AEAI34W4TopAbs_Orientation@@NNAEAN8IIIIIIAEBVmath_Vector@@@Z)
1>Bottle.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __cdecl ChFi3d_Builder::SimulSurf(class Handle_ChFiDS_SurfData &,class Handle_ChFiDS_HElSpine const &,class Handle_ChFiDS_Spine const &,int,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,enum TopAbs_Orientation,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,class Handle_BRepAdaptor_HCurve2d const &,class Handle_BRepAdaptor_HSurface const &,class Handle_BRepAdaptor_HCurve2d const &,unsigned int &,double,double,double &,double &,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,class math_Vector const &)" (?SimulSurf@ChFi3d_Builder@@MEAAXAEAVHandle_ChFiDS_SurfData@@AEBVHandle_ChFiDS_HElSpine@@AEBVHandle_ChFiDS_Spine@@HAEBVHandle_BRepAdaptor_HSurface@@AEBVHandle_Adaptor3d_TopolTool@@W4TopAbs_Orientation@@34AEBVHandle_BRepAdaptor_HCurve2d@@36AEAINNAEAN8IIIIIIAEBVmath_Vector@@@Z)
1>Bottle.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __cdecl ChFi3d_Builder::SimulSurf(class Handle_ChFiDS_SurfData &,class Handle_ChFiDS_HElSpine const &,class Handle_ChFiDS_Spine const &,int,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,class Handle_BRepAdaptor_HCurve2d const &,class Handle_BRepAdaptor_HSurface const &,class Handle_BRepAdaptor_HCurve2d const &,unsigned int &,enum TopAbs_Orientation,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,class Handle_BRepAdaptor_HCurve2d const &,class Handle_BRepAdaptor_HSurface const &,class Handle_BRepAdaptor_HCurve2d const &,unsigned int &,enum TopAbs_Orientation,double,double,double &,double &,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,class math_Vector const &)" (?SimulSurf@ChFi3d_Builder@@MEAAXAEAVHandle_ChFiDS_SurfData@@AEBVHandle_ChFiDS_HElSpine@@AEBVHandle_ChFiDS_Spine@@HAEBVHandle_BRepAdaptor_HSurface@@AEBVHandle_Adaptor3d_TopolTool@@AEBVHandle_BRepAdaptor_HCurve2d@@35AEAIW4TopAbs_Orientation@@3453567NNAEAN8IIIIIIIAEBVmath_Vector@@@Z)
1>Bottle.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __cdecl ChFi3d_Builder::PerformSurf(class ChFiDS_SequenceOfSurfData &,class Handle_ChFiDS_HElSpine const &,class Handle_ChFiDS_Spine const &,int,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,class Handle_BRepAdaptor_HCurve2d const &,class Handle_BRepAdaptor_HSurface const &,class Handle_BRepAdaptor_HCurve2d const &,unsigned int &,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,enum TopAbs_Orientation,double,double,double,double &,double &,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,class math_Vector const &)" (?PerformSurf@ChFi3d_Builder@@MEAAXAEAVChFiDS_SequenceOfSurfData@@AEBVHandle_ChFiDS_HElSpine@@AEBVHandle_ChFiDS_Spine@@HAEBVHandle_BRepAdaptor_HSurface@@AEBVHandle_Adaptor3d_TopolTool@@AEBVHandle_BRepAdaptor_HCurve2d@@35AEAI34W4TopAbs_Orientation@@NNNAEAN8IIIIIIAEBVmath_Vector@@@Z)
1>Bottle.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __cdecl ChFi3d_Builder::PerformSurf(class ChFiDS_SequenceOfSurfData &,class Handle_ChFiDS_HElSpine const &,class Handle_ChFiDS_Spine const &,int,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,enum TopAbs_Orientation,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,class Handle_BRepAdaptor_HCurve2d const &,class Handle_BRepAdaptor_HSurface const &,class Handle_BRepAdaptor_HCurve2d const &,unsigned int &,double,double,double,double &,double &,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,class math_Vector const &)" (?PerformSurf@ChFi3d_Builder@@MEAAXAEAVChFiDS_SequenceOfSurfData@@AEBVHandle_ChFiDS_HElSpine@@AEBVHandle_ChFiDS_Spine@@HAEBVHandle_BRepAdaptor_HSurface@@AEBVHandle_Adaptor3d_TopolTool@@W4TopAbs_Orientation@@34AEBVHandle_BRepAdaptor_HCurve2d@@36AEAINNNAEAN8IIIIIIAEBVmath_Vector@@@Z)
1>Bottle.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __cdecl ChFi3d_Builder::PerformSurf(class ChFiDS_SequenceOfSurfData &,class Handle_ChFiDS_HElSpine const &,class Handle_ChFiDS_Spine const &,int,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,class Handle_BRepAdaptor_HCurve2d const &,class Handle_BRepAdaptor_HSurface const &,class Handle_BRepAdaptor_HCurve2d const &,unsigned int &,enum TopAbs_Orientation,class Handle_BRepAdaptor_HSurface const &,class Handle_Adaptor3d_TopolTool const &,class Handle_BRepAdaptor_HCurve2d const &,class Handle_BRepAdaptor_HSurface const &,class Handle_BRepAdaptor_HCurve2d const &,unsigned int &,enum TopAbs_Orientation,double,double,double,double &,double &,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,class math_Vector const &)" (?PerformSurf@ChFi3d_Builder@@MEAAXAEAVChFiDS_SequenceOfSurfData@@AEBVHandle_ChFiDS_HElSpine@@AEBVHandle_ChFiDS_Spine@@HAEBVHandle_BRepAdaptor_HSurface@@AEBVHandle_Adaptor3d_TopolTool@@AEBVHandle_BRepAdaptor_HCurve2d@@35AEAIW4TopAbs_Orientation@@3453567NNNAEAN8IIIIIIIAEBVmath_Vector@@@Z)
1>Bottle.obj : error LNK2019: 无法解析的外部符号 "public: __cdecl BRepFilletAPI_MakeFillet::BRepFilletAPI_MakeFillet(class TopoDS_Shape const &,enum ChFi3d_FilletShape)" (??0BRepFilletAPI_MakeFillet@@QEAA@AEBVTopoDS_Shape@@W4ChFi3d_FilletShape@@@Z),该符号在函数 "class TopoDS_Shape __cdecl MakeBottle(double,double,double)" (?MakeBottle@@YA?AVTopoDS_Shape@@NNN@Z) 中被引用
1>Bottle.obj : error LNK2019: 无法解析的外部符号 "public: void __cdecl BRepFilletAPI_MakeFillet::Add(double,class TopoDS_Edge const &)" (?Add@BRepFilletAPI_MakeFillet@@QEAAXNAEBVTopoDS_Edge@@@Z),该符号在函数 "class TopoDS_Shape __cdecl MakeBottle(double,double,double)" (?MakeBottle@@YA?AVTopoDS_Shape@@NNN@Z) 中被引用
我添加的lib都是64位的debug也是64的,不存在不搭配产生这种错误的情况。我觉得会不会可能是我少添加了一些lib?
TKernel.lib
TKMath.lib
TKBRep.lib
TKTopAlgo.lib
TKPrim.lib
TKBO.lib
TKG3d.lib
TKGeomAlgo.lib
TKMesh.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
TKGeomBase.lib
TKSTL.lib
TKIGES.lib
TKXSBase.lib
TKSTEP.lib
以上是我添加的所有lib,还麻烦您有空看一下,问题出在了什么地方。不胜感激。