Link error when using GeomAPI_Interpolate

Hi,
I'm currently exploring OpenCascade by manipulating the Tutorial's code. I successfully set up everything tried out some modeling classes like a Bezier Curve. But now I want to try using a BSpline by using this code:

GeomAPI_Interpolate anInterpolation(harray,Standard_False,0.01);
anInterpolation.Perform();
Handle(Geom_BSplineCurve) SPL2 = anInterpolation.Curve();

which should be quite similar to the 2D expample "Build B-Sline curves".
But im facing the following error when hitting my visual studio debug button:
1>MakeBottle.obj : error LNK2019: unresolved external symbol "public: __thiscall GeomAPI_Interpolate::GeomAPI_Interpolate(class Handle_TColgp_HArray1OfPnt const &,unsigned int,double)" (??0GeomAPI_Interpolate@@QAE@ABVHandle_TColgp_HArray1OfPnt@@IN@Z) referenced in function "class TopoDS_Shape __cdecl MakeBottle(double,double,double)" (?MakeBottle@@YA?AVTopoDS_Shape@@NNN@Z)

Looks like the GeomAPI is missing? how can I fix this?

Göran Barz's picture

GeomApi_* belongs to TKGeomAlgo.dll, so make sure you link to TKGeomAlgo.lib in your project

pw-toxic's picture

Thanks, this helped me solve my problem.
But how do I know this? How do I know which libs I need to link when using certain packages? Always asking in the Forum for each linking error isn't the best work flow ;)

Göran Barz's picture

In the download center you can download the documentation of the classes in open cascade. In the top of each class documentation, you find the package and the lib, the class belongs to

Dennis G.'s picture

Or you take a look at the attached file :)