
Hi, are you linking the OpenMesh library files (libOpenMeshCore and libOpenMeshTools) to your binary? Otherwise you get undefined symbols. Regards, Jan Möbius On 1/25/23 05:09, CAi cai wrote:
Hello sir!
I am using OpenMesh for geometry processing but failed to compile. I looked up other people's error messages and how to deal with them, but I didn't see anything that worked for me. I don't know what went wrong with the error message.
My laptop is Apple M1, arm64. And my IDE is CLion.
*The following sentences are the entire compilation error output:*
====================[ Build | AFSR3 | Debug ]=================================== /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/caishuxian/Documents/Reconstruction/Advancing_Front_Method/AFSR3/cmake-build-debug --target AFSR3 -j 6 [1/4] Building CXX object CMakeFiles/AFSR3.dir/AFSR/main.cpp.o /Users/caishuxian/Documents/Reconstruction/Advancing_Front_Method/AFSR3/AFSR/main.cpp:431:41: warning: format specifies type 'int' but the argument has type 'std::priority_queue<dt::CandidatePair, std::vector<dt::CandidatePair>, dt::CandidatePair2>::size_type' (aka 'unsigned long') [-Wformat] printf("\nremain boundary edge:%d\n", boundary.queue.size()); ~~ ^~~~~~~~~~~~~~~~~~~~~ %lu /Users/caishuxian/Documents/Reconstruction/Advancing_Front_Method/AFSR3/AFSR/main.cpp:440:51: warning: format specifies type 'int' but the argument has type 'std::vector<dt::CandidatePair>::size_type' (aka 'unsigned long') [-Wformat] printf("\nremain case later to deal with:%d\n", queue_pop_tmp.size()); ~~ ^~~~~~~~~~~~~~~~~~~~ %lu 2 warnings generated. [4/4] Linking CXX executable AFSR3 FAILED: AFSR3 : && /Library/Developer/CommandLineTools/usr/bin/c++ -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/AFSR3.dir/AFSR/Boundary.cpp.o CMakeFiles/AFSR3.dir/AFSR/CandidatePair.cpp.o CMakeFiles/AFSR3.dir/AFSR/Edge.cpp.o CMakeFiles/AFSR3.dir/AFSR/Face.cpp.o CMakeFiles/AFSR3.dir/AFSR/FileHandle.cpp.o CMakeFiles/AFSR3.dir/AFSR/main.cpp.o CMakeFiles/AFSR3.dir/AFSR/Mesh.cpp.o CMakeFiles/AFSR3.dir/AFSR/Point.cpp.o CMakeFiles/AFSR3.dir/AFSR/Tetra.cpp.o CMakeFiles/AFSR3.dir/AFSR/Vector.cpp.o -o AFSR3 && : Undefined symbols for architecture arm64: "omerr()", referenced from: void OpenMesh::BaseProperty::check_and_set_persistent<OpenMesh::VectorT<float, 3> >(bool) in FileHandle.cpp.o void OpenMesh::BaseProperty::check_and_set_persistent<OpenMesh::DefaultTraits::VertexT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> >(bool) in FileHandle.cpp.o void OpenMesh::BaseProperty::check_and_set_persistent<OpenMesh::DefaultTraits::FaceT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> >(bool) in FileHandle.cpp.o void OpenMesh::BaseProperty::check_and_set_persistent<OpenMesh::DefaultTraits::HalfedgeT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> >(bool) in FileHandle.cpp.o void OpenMesh::BaseProperty::check_and_set_persistent<OpenMesh::DefaultTraits::EdgeT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> >(bool) in FileHandle.cpp.o
OpenMesh::IO::ImporterT<OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraits> >::add_face(std::__1::vector<OpenMesh::VertexHandle, std::__1::allocator<OpenMesh::VertexHandle> > const&) in FileHandle.cpp.o void OpenMesh::BaseProperty::check_and_set_persistent<OpenMesh::Attributes::StatusInfo>(bool) in FileHandle.cpp.o ... "OpenMesh::ArrayKernel::clear()", referenced from: bool OpenMesh::IO::read_mesh<OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraits> >(OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraits>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, OpenMesh::IO::Options&, bool) in FileHandle.cpp.o "OpenMesh::ArrayKernel::reserve(unsigned long, unsigned long, unsigned long)", referenced from:
OpenMesh::IO::ImporterT<OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraits> >::reserve(unsigned int, unsigned int, unsigned int) in FileHandle.cpp.o "OpenMesh::ArrayKernel::ArrayKernel()", referenced from: OpenMesh::PolyConnectivity::PolyConnectivity() in FileHandle.cpp.o "OpenMesh::ArrayKernel::~ArrayKernel()", referenced from: OpenMesh::PolyConnectivity::~PolyConnectivity() in FileHandle.cpp.o
"OpenMesh::TriConnectivity::add_face(std::__1::vector<OpenMesh::VertexHandle, std::__1::allocator<OpenMesh::VertexHandle> > const&)", referenced from:
OpenMesh::IO::ImporterT<OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraits> >::add_face(std::__1::vector<OpenMesh::VertexHandle, std::__1::allocator<OpenMesh::VertexHandle> > const&) in FileHandle.cpp.o "OpenMesh::IO::_IOManager_::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, OpenMesh::IO::BaseImporter&, OpenMesh::IO::Options&)", referenced from: bool OpenMesh::IO::read_mesh<OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraits> >(OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraits>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, OpenMesh::IO::Options&, bool) in FileHandle.cpp.o "OpenMesh::IO::IOManager()", referenced from: bool OpenMesh::IO::read_mesh<OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraits> >(OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraits>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, OpenMesh::IO::Options&, bool) in FileHandle.cpp.o "OpenMesh::ArrayKernel::is_valid_handle(OpenMesh::FaceHandle) const", referenced from: OpenMesh::ArrayKernel::face(OpenMesh::FaceHandle) const in FileHandle.cpp.o OpenMesh::ArrayKernel::face(OpenMesh::FaceHandle) in FileHandle.cpp.o "OpenMesh::ArrayKernel::is_valid_handle(OpenMesh::VertexHandle) const", referenced from: OpenMesh::ArrayKernel::vertex(OpenMesh::VertexHandle) const in FileHandle.cpp.o
OpenMesh::IO::ImporterT<OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraits> >::add_face(std::__1::vector<OpenMesh::VertexHandle, std::__1::allocator<OpenMesh::VertexHandle> > const&) in FileHandle.cpp.o OpenMesh::ArrayKernel::vertex(OpenMesh::VertexHandle) in FileHandle.cpp.o "OpenMesh::ArrayKernel::is_valid_handle(OpenMesh::HalfedgeHandle) const", referenced from: OpenMesh::ArrayKernel::halfedge(OpenMesh::HalfedgeHandle) const in FileHandle.cpp.o OpenMesh::ArrayKernel::halfedge(OpenMesh::HalfedgeHandle) in FileHandle.cpp.o
OpenMesh::ArrayKernel::set_next_halfedge_handle(OpenMesh::HalfedgeHandle, OpenMesh::HalfedgeHandle) in FileHandle.cpp.o
OpenMesh::ArrayKernel::set_prev_halfedge_handle(OpenMesh::HalfedgeHandle, OpenMesh::HalfedgeHandle) in FileHandle.cpp.o "OpenMesh::ArrayKernel::handle(OpenMesh::ArrayItems::Edge const&) const", referenced from: OpenMesh::ArrayKernel::new_edge(OpenMesh::VertexHandle, OpenMesh::VertexHandle) in FileHandle.cpp.o "OpenMesh::ArrayKernel::handle(OpenMesh::ArrayItems::Face const&) const", referenced from: OpenMesh::ArrayKernel::new_face() in FileHandle.cpp.o "OpenMesh::ArrayKernel::handle(OpenMesh::ArrayItems::Vertex const&) const", referenced from: OpenMesh::ArrayKernel::new_vertex() in FileHandle.cpp.o "OpenMesh::BaseProperty::stats(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const", referenced from: vtable for OpenMesh::PropertyT<OpenMesh::VectorT<float, 3> > in FileHandle.cpp.o vtable for OpenMesh::PropertyT<OpenMesh::DefaultTraits::VertexT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> > in FileHandle.cpp.o vtable for OpenMesh::PropertyT<OpenMesh::DefaultTraits::FaceT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> > in FileHandle.cpp.o vtable for OpenMesh::PropertyT<OpenMesh::DefaultTraits::HalfedgeT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> > in FileHandle.cpp.o vtable for OpenMesh::PropertyT<OpenMesh::DefaultTraits::EdgeT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> > in FileHandle.cpp.o vtable for OpenMesh::PropertyT<OpenMesh::Attributes::StatusInfo> in FileHandle.cpp.o vtable for OpenMesh::PropertyT<OpenMesh::VectorT<float, 2> > in FileHandle.cpp.o ... "typeinfo for OpenMesh::ArrayKernel", referenced from: typeinfo for OpenMesh::PolyConnectivity in FileHandle.cpp.o "typeinfo for OpenMesh::BaseProperty", referenced from: typeinfo for OpenMesh::PropertyT<OpenMesh::VectorT<float, 3> > in FileHandle.cpp.o typeinfo for OpenMesh::PropertyT<OpenMesh::DefaultTraits::VertexT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> > in FileHandle.cpp.o typeinfo for OpenMesh::PropertyT<OpenMesh::DefaultTraits::FaceT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> > in FileHandle.cpp.o typeinfo for OpenMesh::PropertyT<OpenMesh::DefaultTraits::HalfedgeT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> > in FileHandle.cpp.o typeinfo for OpenMesh::PropertyT<OpenMesh::DefaultTraits::EdgeT<OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::ITraits, OpenMesh::FinalMeshItemsT<OpenMesh::DefaultTraits, true>::Refs> > in FileHandle.cpp.o typeinfo for OpenMesh::PropertyT<OpenMesh::Attributes::StatusInfo> in FileHandle.cpp.o typeinfo for OpenMesh::PropertyT<OpenMesh::VectorT<float, 2> > in FileHandle.cpp.o ... "vtable for OpenMesh::BaseProperty", referenced from: OpenMesh::BaseProperty::BaseProperty(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in FileHandle.cpp.o OpenMesh::BaseProperty::~BaseProperty() in FileHandle.cpp.o OpenMesh::BaseProperty::BaseProperty(OpenMesh::BaseProperty const&) in FileHandle.cpp.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.
If you know the cause of the error, please let me know, I would be very grateful.
Thank you!
_______________________________________________ OpenMesh mailing list -- openmesh@lists.rwth-aachen.de To unsubscribe send an email to openmesh-leave@lists.rwth-aachen.de https://lists.rwth-aachen.de/postorius/lists/openmesh.lists.rwth-aachen.de
-- Dr. Jan Möbius Visual Computing Institute RWTH Aachen University Ahornstrasse 55, 52074 Aachen, Germany Phone ++49 (0)241 80-21802 Fax ++49 (0)241 80-22899 mailto:moebius@cs.rwth-aachen.de