-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with compilation #50
Comments
You should always use CMake, otherwise you need a whole other compiler invocation command, dont do this. Run cmake, build it, run the executable in the example build folder.
Von meinem iPhone gesendet
… Am 01.11.2022 um 22:51 schrieb Quankai Gao ***@***.***>:
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()'
Does it matter if I ignore the "CMake FindScripts" step ? Cause this is the only different between my implementation and your official guidance.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
Hi, thanks for your response. I tried to run cmake but then I got this: CMake Error at CMakeLists.txt:3 (include):
CMake Error at CMakeLists.txt:6 (setTargetCompileOptions): |
main': main.cpp:(.text+0x304): undefined reference to
ApproxMVBB::OOBB::expandToMinExtentAbsolute(double)'
What did you run? |
I cd to "example/approxMVBB" and mkdir "Build/", and ran "cmake .." |
DId you read the Readme ? ;) git clone https://github.com/gabyx/ApproxMVBB.git ApproxMVBB
cd ApproxMVBB
mkdir build && cd build
cmake -DApproxMVBB_BUILD_EXAMPLES=ON ..
make -j
cd examples/... |
I mean... I met the errors after all these things, I couldn't run the example. make all and still got the erros like undefined reference to ApproxMVBB::OOBB::expandToMinExtentAbsolute(double)' |
show me the output of exaclty this git clone https://github.com/gabyx/ApproxMVBB.git ApproxMVBB > LOG
cd ApproxMVBB
mkdir build && cd build
cmake -DApproxMVBB_BUILD_EXAMPLES=ON .. >> LOG Upload the LOG here. |
Thank you for the reply, the log is here: -- Module path is now set to: /home/gqk/ApproxMVBB/cmake/ |
Can you check the log of cd build && make > LOG |
Sure, there it is: /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -S/home/gqk/ApproxMVBB -B/home/gqk/ApproxMVBB/build --check-build-system CMakeFiles/Makefile.cmake 0 |
Everything looks good, the project has been build and you can now navigate to |
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.
The text was updated successfully, but these errors were encountered: