I started using vcpkg
for my code base. I have included the following manifest
{
"name": "project",
"version-string": "0.1.1",
"dependencies" : [
"boost-filesystem",
"boost-system",
"boost-timer",
"eigen3",
"opencv",
"spdlog",
"jsoncpp",
{
"name": "opencascade",
"features" : [ "freeimage" ]
}
}
My OS is Linux Mint, I then configure my project using cmake
cmake -DCMAKE_TOOLCHAIN_FILE=/home/ali/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -GNinja ..
When I build my software in this setting I get the following errors ( reduced to a few lines but the rest is the same as these )
/usr/bin/ld: ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx:(.text+0x4c62): undefined reference
to `GeomConvert_BSplineSurfaceToBezierSurface::UKnots(NCollection_Array1<double>&) const'
/usr/bin/ld: ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx:(.text+0x4e96): undefined reference
to `GeomConvert_BSplineSurfaceToBezierSurface::VKnots(NCollection_Array1<double>&) const'
/usr/bin/ld: ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx:(.text+0x5280): undefined reference
to `GeomConvert_BSplineSurfaceToBezierSurface::Patches(NCollection_Array2<opencascade::handle<Geom_BezierSurface> >&)'
/usr/bin/ld: /home/ali/vcpkg/installed/x64-linux/lib/libTKGeomBase.a(IntAna2d_Conic.cxx.o): in
function `IntAna2d_Conic::IntAna2d_Conic(gp_Elips2d const&)':
IntAna2d_Conic.cxx:(.text+0xe7): undefined reference to `gp_Elips2d::Coefficients(double&,
double&, double&, double&, double&, double&) const'
/usr/bin/ld: /home/ali/vcpkg/installed/x64-linux/lib/libTKGeomBase.a(IntAna2d_Conic.cxx.o): in
function `IntAna2d_Conic::IntAna2d_Conic(gp_Hypr2d const&)':
IntAna2d_Conic.cxx:(.text+0x147): undefined reference to `gp_Hypr2d::Coefficients(double&,
double&, double&, double&, double&, double&) const'
/usr/bin/ld: /home/ali/vcpkg/installed/x64-linux/lib/libTKGeomBase.a(gce_MakeLin2d.cxx.o): in
function `gce_MakeLin2d::gce_MakeLin2d(double, double, double)':
gce_MakeLin2d.cxx:(.text+0xd4): undefined reference to `gp_Lin2d::gp_Lin2d(double, double,
double)'
collect2: error: ld returned 1 exit status
I don't see how there should be a linker issue with internal opencascade code. The libraries exist in the same directory.
Thanks for the help.