Open Zerg-Overmind opened 1 year ago
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): include could not find requested file:
SetTargetCompileOptions
CMake Error at CMakeLists.txt:6 (setTargetCompileOptions): Unknown CMake command "setTargetCompileOptions".
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. As I said, I've run
make all make install
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/
-- Project name is: ApproxMVBB-
-- The CXX compiler identification is GNU 7.5.0
-- The C compiler identification is GNU 7.5.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Set make program to /home/gqk/ApproxMVBB/build/parallelmake.sh
-- Meta: find meta
-- Meta: Setup External Projext
-- /home/gqk/ApproxMVBB/build/src/meta/include
-- Found Meta: /home/gqk/ApproxMVBB/build/src/meta/include
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Added '' to CMAKE_CXX and CMAKE_C_FLAGS: and
-- Adding ApproxMVBB - Diameter ======================
-- ====================================================
-- Adding ApproxMVBB - GeometryPredicates ============
-- Performing Test HAVEFPU_SETCW
-- Performing Test HAVE__FPU_SETCW - Failed
-- Performing Test HAVE_FPSETPREC
-- Performing Test HAVE_FPSETPREC - Failed
-- Performing Test HAVECONTROLFP
-- Performing Test HAVECONTROLFP - Failed
-- Performing Test HAVECONTROLFP_S
-- Performing Test HAVE__CONTROLFP_S - Failed
-- Performing Test HAVE_FPU_INLINE_ASM_X86
-- Performing Test HAVE_FPU_INLINE_ASM_X86 - Success
-- Floating point control:
HAVEFPU_SETCW
HAVE_FPSETPREC
HAVECONTROLFP
HAVE__CONTROLFP_S
HAVE_FPU_INLINE_ASM_X86 1
-- ====================================================
-- ApproxMVBB: Write config file /home/gqk/ApproxMVBB/build/include/ApproxMVBB/Config/Config.hpp,
-- ApproxMVBB Version: -- v2.1.3
extracted from git tags!
-- Dependecy Libs (public): eigenLib
-- Downloading/updating googletest
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gqk/ApproxMVBB/build/thirdparty/googletest-download
[ 12%] Creating directories for 'googletest-download'
[ 25%] Performing download step (git clone) for 'googletest-download'
Your branch is up-to-date with 'origin/main'.
[ 37%] No patch step for 'googletest-download'
[ 50%] No configure step for 'googletest-download'
[ 62%] No build step for 'googletest-download'
[ 75%] No install step for 'googletest-download'
[ 87%] No test step for 'googletest-download'
[100%] Completed 'googletest-download'
[100%] Built target googletest-download
-- Found Python: /home/gqk/anaconda3/bin/python3.7 (found version "3.7.6") found components: Interpreter
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gqk/ApproxMVBB/build
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 /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_progress_start /home/gqk/ApproxMVBB/build/CMakeFiles /home/gqk/ApproxMVBB/build//CMakeFiles/progress.marks make -f CMakeFiles/Makefile2 all make[1]: Entering directory '/home/gqk/ApproxMVBB/build' make -f CMakeFiles/meta.dir/build.make CMakeFiles/meta.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/CMakeFiles/meta.dir/DependInfo.cmake --color= make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f CMakeFiles/meta.dir/build.make CMakeFiles/meta.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' [ 1%] Performing update step for 'meta' cd /home/gqk/ApproxMVBB/build/src/meta && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -P /home/gqk/ApproxMVBB/build/tmp/meta-gitupdate.cmake [ 3%] No patch step for 'meta' /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E echo_append /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E touch /home/gqk/ApproxMVBB/build/src/meta-stamp/meta-patch [ 4%] Performing configure step for 'meta' cd /home/gqk/ApproxMVBB/build/src/meta-build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_CXX_FLAGS= "-GUnix Makefiles" /home/gqk/ApproxMVBB/build/src/meta -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Doxygen not found; the 'doc' and 'gh-pages.{clean,copy,update}' targets will be unavailable. -- Configuring done -- Generating done -- Build files have been written to: /home/gqk/ApproxMVBB/build/src/meta-build cd /home/gqk/ApproxMVBB/build/src/meta-build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E touch /home/gqk/ApproxMVBB/build/src/meta-stamp/meta-configure [ 6%] No build step for 'meta' cd /home/gqk/ApproxMVBB/build/src/meta-build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E echo_append cd /home/gqk/ApproxMVBB/build/src/meta-build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E touch /home/gqk/ApproxMVBB/build/src/meta-stamp/meta-build [ 7%] No install step for 'meta' cd /home/gqk/ApproxMVBB/build/src/meta-build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E echo_append cd /home/gqk/ApproxMVBB/build/src/meta-build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E touch /home/gqk/ApproxMVBB/build/src/meta-stamp/meta-install [ 9%] Completed 'meta' /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E make_directory /home/gqk/ApproxMVBB/build/CMakeFiles /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E touch /home/gqk/ApproxMVBB/build/CMakeFiles/meta-complete /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E touch /home/gqk/ApproxMVBB/build/src/meta-stamp/meta-done make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 12%] Built target meta make -f lib/CMakeFiles/ApproxMVBB.dir/build.make lib/CMakeFiles/ApproxMVBB.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/lib /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/lib /home/gqk/ApproxMVBB/build/lib/CMakeFiles/ApproxMVBB.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target ApproxMVBB make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f lib/CMakeFiles/ApproxMVBB.dir/build.make lib/CMakeFiles/ApproxMVBB.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'lib/CMakeFiles/ApproxMVBB.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 33%] Built target ApproxMVBB make -f lib/CMakeFiles/ApproxMVBBForTestsOnly.dir/build.make lib/CMakeFiles/ApproxMVBBForTestsOnly.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/lib /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/lib /home/gqk/ApproxMVBB/build/lib/CMakeFiles/ApproxMVBBForTestsOnly.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target ApproxMVBBForTestsOnly make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f lib/CMakeFiles/ApproxMVBBForTestsOnly.dir/build.make lib/CMakeFiles/ApproxMVBBForTestsOnly.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'lib/CMakeFiles/ApproxMVBBForTestsOnly.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 54%] Built target ApproxMVBBForTestsOnly make -f thirdparty/googletest-build/googletest/CMakeFiles/gtest.dir/build.make thirdparty/googletest-build/googletest/CMakeFiles/gtest.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/build/thirdparty/googletest-src/googletest /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/thirdparty/googletest-build/googletest /home/gqk/ApproxMVBB/build/thirdparty/googletest-build/googletest/CMakeFiles/gtest.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target gtest make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f thirdparty/googletest-build/googletest/CMakeFiles/gtest.dir/build.make thirdparty/googletest-build/googletest/CMakeFiles/gtest.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'thirdparty/googletest-build/googletest/CMakeFiles/gtest.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 57%] Built target gtest make -f thirdparty/googletest-build/googlemock/CMakeFiles/gmock.dir/build.make thirdparty/googletest-build/googlemock/CMakeFiles/gmock.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/build/thirdparty/googletest-src/googlemock /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/thirdparty/googletest-build/googlemock /home/gqk/ApproxMVBB/build/thirdparty/googletest-build/googlemock/CMakeFiles/gmock.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target gmock make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f thirdparty/googletest-build/googlemock/CMakeFiles/gmock.dir/build.make thirdparty/googletest-build/googlemock/CMakeFiles/gmock.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'thirdparty/googletest-build/googlemock/CMakeFiles/gmock.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 60%] Built target gmock make -f thirdparty/googletest-build/googlemock/CMakeFiles/gmock_main.dir/build.make thirdparty/googletest-build/googlemock/CMakeFiles/gmock_main.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/build/thirdparty/googletest-src/googlemock /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/thirdparty/googletest-build/googlemock /home/gqk/ApproxMVBB/build/thirdparty/googletest-build/googlemock/CMakeFiles/gmock_main.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target gmock_main make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f thirdparty/googletest-build/googlemock/CMakeFiles/gmock_main.dir/build.make thirdparty/googletest-build/googlemock/CMakeFiles/gmock_main.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'thirdparty/googletest-build/googlemock/CMakeFiles/gmock_main.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 63%] Built target gmock_main make -f tests/CMakeFiles/ApproxMVBBTest-ConvexHull.dir/build.make tests/CMakeFiles/ApproxMVBBTest-ConvexHull.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/tests /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/tests /home/gqk/ApproxMVBB/build/tests/CMakeFiles/ApproxMVBBTest-ConvexHull.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target ApproxMVBBTest-ConvexHull make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f tests/CMakeFiles/ApproxMVBBTest-ConvexHull.dir/build.make tests/CMakeFiles/ApproxMVBBTest-ConvexHull.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'tests/CMakeFiles/ApproxMVBBTest-ConvexHull.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 69%] Built target ApproxMVBBTest-ConvexHull make -f tests/CMakeFiles/ApproxMVBBTest-MinAreaRect.dir/build.make tests/CMakeFiles/ApproxMVBBTest-MinAreaRect.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/tests /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/tests /home/gqk/ApproxMVBB/build/tests/CMakeFiles/ApproxMVBBTest-MinAreaRect.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target ApproxMVBBTest-MinAreaRect make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f tests/CMakeFiles/ApproxMVBBTest-MinAreaRect.dir/build.make tests/CMakeFiles/ApproxMVBBTest-MinAreaRect.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'tests/CMakeFiles/ApproxMVBBTest-MinAreaRect.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 75%] Built target ApproxMVBBTest-MinAreaRect make -f tests/CMakeFiles/ApproxMVBBTest-Diameter.dir/build.make tests/CMakeFiles/ApproxMVBBTest-Diameter.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/tests /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/tests /home/gqk/ApproxMVBB/build/tests/CMakeFiles/ApproxMVBBTest-Diameter.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target ApproxMVBBTest-Diameter make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f tests/CMakeFiles/ApproxMVBBTest-Diameter.dir/build.make tests/CMakeFiles/ApproxMVBBTest-Diameter.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'tests/CMakeFiles/ApproxMVBBTest-Diameter.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 81%] Built target ApproxMVBBTest-Diameter make -f tests/CMakeFiles/ApproxMVBBTest-DiameterOOBB.dir/build.make tests/CMakeFiles/ApproxMVBBTest-DiameterOOBB.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/tests /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/tests /home/gqk/ApproxMVBB/build/tests/CMakeFiles/ApproxMVBBTest-DiameterOOBB.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target ApproxMVBBTest-DiameterOOBB make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f tests/CMakeFiles/ApproxMVBBTest-DiameterOOBB.dir/build.make tests/CMakeFiles/ApproxMVBBTest-DiameterOOBB.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'tests/CMakeFiles/ApproxMVBBTest-DiameterOOBB.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 87%] Built target ApproxMVBBTest-DiameterOOBB make -f tests/CMakeFiles/ApproxMVBBTest-MVBB.dir/build.make tests/CMakeFiles/ApproxMVBBTest-MVBB.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/tests /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/tests /home/gqk/ApproxMVBB/build/tests/CMakeFiles/ApproxMVBBTest-MVBB.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target ApproxMVBBTest-MVBB make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f tests/CMakeFiles/ApproxMVBBTest-MVBB.dir/build.make tests/CMakeFiles/ApproxMVBBTest-MVBB.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'tests/CMakeFiles/ApproxMVBBTest-MVBB.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 93%] Built target ApproxMVBBTest-MVBB make -f example/approxMVBB/CMakeFiles/ApproxMVBBExample-MVBB.dir/build.make example/approxMVBB/CMakeFiles/ApproxMVBBExample-MVBB.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/example/approxMVBB /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/example/approxMVBB /home/gqk/ApproxMVBB/build/example/approxMVBB/CMakeFiles/ApproxMVBBExample-MVBB.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target ApproxMVBBExample-MVBB make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f example/approxMVBB/CMakeFiles/ApproxMVBBExample-MVBB.dir/build.make example/approxMVBB/CMakeFiles/ApproxMVBBExample-MVBB.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'example/approxMVBB/CMakeFiles/ApproxMVBBExample-MVBB.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [ 96%] Built target ApproxMVBBExample-MVBB make -f example/kdTreeFiltering/CMakeFiles/ApproxMVBBExample-KdTree.dir/build.make example/kdTreeFiltering/CMakeFiles/ApproxMVBBExample-KdTree.dir/depend make[2]: Entering directory '/home/gqk/ApproxMVBB/build' cd /home/gqk/ApproxMVBB/build && /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /home/gqk/ApproxMVBB /home/gqk/ApproxMVBB/example/kdTreeFiltering /home/gqk/ApproxMVBB/build /home/gqk/ApproxMVBB/build/example/kdTreeFiltering /home/gqk/ApproxMVBB/build/example/kdTreeFiltering/CMakeFiles/ApproxMVBBExample-KdTree.dir/DependInfo.cmake --color= Consolidate compiler generated dependencies of target ApproxMVBBExample-KdTree make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' make -f example/kdTreeFiltering/CMakeFiles/ApproxMVBBExample-KdTree.dir/build.make example/kdTreeFiltering/CMakeFiles/ApproxMVBBExample-KdTree.dir/build make[2]: Entering directory '/home/gqk/ApproxMVBB/build' make[2]: Nothing to be done for 'example/kdTreeFiltering/CMakeFiles/ApproxMVBBExample-KdTree.dir/build'. make[2]: Leaving directory '/home/gqk/ApproxMVBB/build' [100%] Built target ApproxMVBBExample-KdTree make[1]: Leaving directory '/home/gqk/ApproxMVBB/build' /opt/cmake-3.23.0-rc2-linux-x86_64/bin/cmake -E cmake_progress_start /home/gqk/ApproxMVBB/build/CMakeFiles 0
Everything looks good, the project has been build and you can now navigate to build/examples/... and look for the binaries and execute them.
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 functionApproxMVBB::OOBB::setZAxisLongest()': main.cpp:(.text._ZN10ApproxMVBB4OOBB15setZAxisLongestEv[_ZN10ApproxMVBB4OOBB15setZAxisLongestEv]+0x48): undefined reference to
ApproxMVBB::OOBB::switchZAxis(unsigned int)' /tmp/ccsedFcN.o: In functionApproxMVBB::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 toApproxMVBB::ProjectedPointSet::~ProjectedPointSet()' main.cpp:(.text._ZN10ApproxMVBB19approximateMVBBDiamIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EEdjm[_ZN10ApproxMVBB19approximateMVBBDiamIN5Eigen6MatrixIdLi3ELin1ELi0ELi3ELin1EEEEENS_4OOBBERKNS1_10MatrixBaseIT_EEdjm]+0x328): undefined reference to
ApproxMVBB::ProjectedPointSet::~ProjectedPointSet()' /tmp/ccsedFcN.o: In functionApproxMVBB::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 toApproxMVBB::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 toApproxMVBB::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 functionstd::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 functionApproxMVBB::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 functionApproxMVBB::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 toApproxMVBB::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 toApproxMVBB::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 toApproxMVBB::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 functionstd::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 statusDoes it matter if I ignore the "CMake FindScripts" step ? Cause this is the only different between my implementation and your official guidance.