Skip to content

Problem with compilation #50

Description

@Zerg-Overmind

Hi, after building and install the project by
make all
make install

I directly went into "example/approxMVBB/" and ran "g++ main.cpp", and I got error like:

/tmp/ccsedFcN.o: In function main': main.cpp:(.text+0x304): undefined reference to ApproxMVBB::OOBB::expandToMinExtentAbsolute(double)'
/tmp/ccsedFcN.o: In function ApproxMVBB::OOBB::setZAxisLongest()': main.cpp:(.text._ZN10ApproxMVBB4OOBB15setZAxisLongestEv[_ZN10ApproxMVBB4OOBB15setZAxisLongestEv]+0x48): undefined reference to ApproxMVBB::OOBB::switchZAxis(unsigned int)'
/tmp/ccsedFcN.o: In function ApproxMVBB::OOBB ApproxMVBB::approximateMVBBDiam<Eigen::Matrix<double, 3, -1, 0, 3, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, 3, -1, 0, 3, -1> > const&, double, unsigned int, unsigned long)': main.cpp:(.text._ZN10ApproxMVBB19approximateMVBBDiamIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EEdjm[_ZN10ApproxMVBB19approximateMVBBDiamIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EEdjm]+0x233): undefined reference to ApproxMVBB::ProjectedPointSet::ProjectedPointSet()'
main.cpp:(.text._ZN10ApproxMVBB19approximateMVBBDiamIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EEdjm[_ZN10ApproxMVBB19approximateMVBBDiamIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EEdjm]+0x2fd): undefined reference to ApproxMVBB::ProjectedPointSet::~ProjectedPointSet()' main.cpp:(.text._ZN10ApproxMVBB19approximateMVBBDiamIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EEdjm[_ZN10ApproxMVBB19approximateMVBBDiamIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EEdjm]+0x328): undefined reference to ApproxMVBB::ProjectedPointSet::~ProjectedPointSet()'
/tmp/ccsedFcN.o: In function ApproxMVBB::OOBB ApproxMVBB::approximateMVBBGridSearch<Eigen::Matrix<double, 3, -1, 0, 3, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, 3, -1, 0, 3, -1> > const&, ApproxMVBB::OOBB, double, unsigned int, unsigned int, double, double)': main.cpp:(.text._ZN10ApproxMVBB25approximateMVBBGridSearchIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_djjdd[_ZN10ApproxMVBB25approximateMVBBGridSearchIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_djjdd]+0x76): undefined reference to ApproxMVBB::OOBB::expandToMinExtentAbsolute(double)'
main.cpp:(.text._ZN10ApproxMVBB25approximateMVBBGridSearchIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_djjdd[_ZN10ApproxMVBB25approximateMVBBGridSearchIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_djjdd]+0xdf): undefined reference to ApproxMVBB::ProjectedPointSet::ProjectedPointSet()' main.cpp:(.text._ZN10ApproxMVBB25approximateMVBBGridSearchIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_djjdd[_ZN10ApproxMVBB25approximateMVBBGridSearchIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_djjdd]+0x2bd): undefined reference to ApproxMVBB::OOBB::expandToMinExtentAbsolute(double)'
main.cpp:(.text._ZN10ApproxMVBB25approximateMVBBGridSearchIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_djjdd[_ZN10ApproxMVBB25approximateMVBBGridSearchIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_djjdd]+0x4c0): undefined reference to ApproxMVBB::ProjectedPointSet::~ProjectedPointSet()' main.cpp:(.text._ZN10ApproxMVBB25approximateMVBBGridSearchIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_djjdd[_ZN10ApproxMVBB25approximateMVBBGridSearchIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_djjdd]+0x4f0): undefined reference to ApproxMVBB::ProjectedPointSet::~ProjectedPointSet()'
/tmp/ccsedFcN.o: In function std::pair<Eigen::Matrix<double, 3u, 1, ((Eigen::StorageOptions)0)|((((3u)==(1))&&((1)!=(1)))?((Eigen::StorageOptions)1) : ((((1)==(1))&&((3u)!=(1)))?((Eigen::StorageOptions)0) : ((Eigen::StorageOptions)0))), 3u, 1>, Eigen::Matrix<double, 3u, 1, ((Eigen::StorageOptions)0)|((((3u)==(1))&&((1)!=(1)))?((Eigen::StorageOptions)1) : ((((1)==(1))&&((3u)!=(1)))?((Eigen::StorageOptions)0) : ((Eigen::StorageOptions)0))), 3u, 1> > ApproxMVBB::PointFunctions::estimateDiameter<3u, Eigen::Matrix<double, 3, -1, 0, 3, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, 3, -1, 0, 3, -1> > const&, double, unsigned long)': main.cpp:(.text._ZN10ApproxMVBB14PointFunctions16estimateDiameterILj3EN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEESt4pairINS3_IdXT_ELi1EXorLNS2_14StorageOptionsE0EquaaeqT_Li1EneLi1ELi1ELS6_1EquaaeqLi1ELi1EneT_Li1ELS6_0ELS6_0EEXT_ELi1EEES7_ERKNS2_10MatrixBaseIT0_EEdm[_ZN10ApproxMVBB14PointFunctions16estimateDiameterILj3EN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEESt4pairINS3_IdXT_ELi1EXorLNS2_14StorageOptionsE0EquaaeqT_Li1EneLi1ELi1ELS6_1EquaaeqLi1ELi1EneT_Li1ELS6_0ELS6_0EEXT_ELi1EEES7_ERKNS2_10MatrixBaseIT0_EEdm]+0x142): undefined reference to ApproxMVBB::DiameterEstimator::estimateDiameter(ApproxMVBB::Diameter::TypeSegment*, double const**, int, int, int, double)'
/tmp/ccsedFcN.o: In function ApproxMVBB::OOBB ApproxMVBB::ProjectedPointSet::computeMVBBApprox<Eigen::Matrix<double, 3, -1, 0, 3, -1> >(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::MatrixBase<Eigen::Matrix<double, 3, -1, 0, 3, -1> > const&, double)': main.cpp:(.text._ZN10ApproxMVBB17ProjectedPointSet17computeMVBBApproxIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS3_IdLi3ELi1ELi0ELi3ELi1EEERKNS2_10MatrixBaseIT_EEd[_ZN10ApproxMVBB17ProjectedPointSet17computeMVBBApproxIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS3_IdLi3ELi1ELi0ELi3ELi1EEERKNS2_10MatrixBaseIT_EEd]+0x554): undefined reference to ApproxMVBB::OOBB::OOBB(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 3, 0, 3, 3> const&)'
/tmp/ccsedFcN.o: In function ApproxMVBB::OOBB ApproxMVBB::optimizeMVBB<Eigen::Matrix<double, 3, -1, 0, 3, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, 3, -1, 0, 3, -1> > const&, ApproxMVBB::OOBB, unsigned int, double, double)': main.cpp:(.text._ZN10ApproxMVBB12optimizeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_jdd[_ZN10ApproxMVBB12optimizeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_jdd]+0xfa): undefined reference to ApproxMVBB::ProjectedPointSet::ProjectedPointSet()'
main.cpp:(.text._ZN10ApproxMVBB12optimizeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_jdd[_ZN10ApproxMVBB12optimizeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_jdd]+0x2d0): undefined reference to ApproxMVBB::OOBB::expandToMinExtentAbsolute(double)' main.cpp:(.text._ZN10ApproxMVBB12optimizeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_jdd[_ZN10ApproxMVBB12optimizeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_jdd]+0x377): undefined reference to ApproxMVBB::ProjectedPointSet::~ProjectedPointSet()'
main.cpp:(.text._ZN10ApproxMVBB12optimizeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_jdd[_ZN10ApproxMVBB12optimizeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EES4_jdd]+0x38b): undefined reference to ApproxMVBB::ProjectedPointSet::~ProjectedPointSet()' /tmp/ccsedFcN.o: In function ApproxMVBB::OOBB ApproxMVBB::ProjectedPointSet::computeMVBB<Eigen::Matrix<double, 3, -1, 0, 3, -1> >(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::MatrixBase<Eigen::Matrix<double, 3, -1, 0, 3, -1> > const&)':
main.cpp:(.text._ZN10ApproxMVBB17ProjectedPointSet11computeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS3_IdLi3ELi1ELi0ELi3ELi1EEERKNS2_10MatrixBaseIT_EE[_ZN10ApproxMVBB17ProjectedPointSet11computeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS3_IdLi3ELi1ELi0ELi3ELi1EEERKNS2_10MatrixBaseIT_EE]+0x91): undefined reference to ApproxMVBB::MinAreaRectangle::compute()' main.cpp:(.text._ZN10ApproxMVBB17ProjectedPointSet11computeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS3_IdLi3ELi1ELi0ELi3ELi1EEERKNS2_10MatrixBaseIT_EE[_ZN10ApproxMVBB17ProjectedPointSet11computeMVBBIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS3_IdLi3ELi1ELi0ELi3ELi1EEERKNS2_10MatrixBaseIT_EE]+0x36e): undefined reference to ApproxMVBB::OOBB::OOBB(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 3, 0, 3, 3> const&)'
/tmp/ccsedFcN.o: In function std::pair<Eigen::Matrix<double, 2u, 1, ((Eigen::StorageOptions)0)|((((2u)==(1))&&((1)!=(1)))?((Eigen::StorageOptions)1) : ((((1)==(1))&&((2u)!=(1)))?((Eigen::StorageOptions)0) : ((Eigen::StorageOptions)0))), 2u, 1>, Eigen::Matrix<double, 2u, 1, ((Eigen::StorageOptions)0)|((((2u)==(1))&&((1)!=(1)))?((Eigen::StorageOptions)1) : ((((1)==(1))&&((2u)!=(1)))?((Eigen::StorageOptions)0) : ((Eigen::StorageOptions)0))), 2u, 1> > ApproxMVBB::PointFunctions::estimateDiameter<2u, Eigen::Matrix<double, 2, -1, 0, 2, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, 2, -1, 0, 2, -1> > const&, double, unsigned long)': main.cpp:(.text._ZN10ApproxMVBB14PointFunctions16estimateDiameterILj2EN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEEEESt4pairINS3_IdXT_ELi1EXorLNS2_14StorageOptionsE0EquaaeqT_Li1EneLi1ELi1ELS6_1EquaaeqLi1ELi1EneT_Li1ELS6_0ELS6_0EEXT_ELi1EEES7_ERKNS2_10MatrixBaseIT0_EEdm[_ZN10ApproxMVBB14PointFunctions16estimateDiameterILj2EN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEEEESt4pairINS3_IdXT_ELi1EXorLNS2_14StorageOptionsE0EquaaeqT_Li1EneLi1ELi1ELS6_1EquaaeqLi1ELi1EneT_Li1ELS6_0ELS6_0EEXT_ELi1EEES7_ERKNS2_10MatrixBaseIT0_EEdm]+0x142): undefined reference to ApproxMVBB::DiameterEstimator::estimateDiameter(ApproxMVBB::Diameter::TypeSegment*, double const**, int, int, int, double)'
collect2: error: ld returned 1 exit status

Does it matter if I ignore the "CMake FindScripts" step ? Cause this is the only different between my implementation and your official guidance.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions