我尝试编译 https://github.com/personalrobotics/OpenChisel/tree/master/open_chisel 用它来渲染google tango device
我尝试使用以下标志为Android 4.4,ndk r10e和NDK_TOOLCHAIN_VERSION = 4.9(gcc 4.9)编译它:
LOCAL_CFLAGS = -std=c++11 -frtti -fexceptions -fopenmp -w
LOCAL_LDLIBS = -llog -lGLESv2 -L$(SYSROOT)/usr/lib
包括最新的Eigen版本3.2.8
我还尝试使用NDK_TOOLCHAIN_VERSION = 4.8和较旧的Eigen版本。
但是我总是在ChunkManager.cpp文件中找到以下链接器错误:
征/本征/核心 (未知)包含的文件 Eigen / Eigen / src / Core / util / Memory.h:实例化' void Eigen :: aligned_allocator :: construct(Eigen :: aligned_allocator :: pointer,const T&)[with T = std :: _ Sp_counted_ptr_inplace ,(__ gn_cxx :: _ Lock_policy)2u&gt ;; Eigen :: aligned_allocator :: pointer = std :: _ Sp_counted_ptr_inplace,(_ _ gn_cxx :: _ Lock_policy)2u> *]':
这只是一个信息,但可能会告诉某人某事
机器人-NDK-r10e /源/ CXX-STL / GNU-的libstdc ++ / 4.9 /包含/比特/ alloc_traits.h 信息:(253,4):_需要:: __ construct_helper< _Tp,Args> :: type> std :: allocator_traits< _Alloc> :: _ S_construct(_Alloc&,_Tp *,_ Args&& ...)[with _Tp = std :: _ Sp_counted_ptr_inplace,(__ gn_cxx :: _ Lock_policy)2u&gt ;; _Args = {const Eigen :: aligned_allocator}; _Alloc = Eigen :: aligned_allocator,(__ gn_cxx :: _ Lock_policy)2u>取代; std :: _ Require :: __ construct_helper< _Tp,_Args> :: type> = void]'
android-ndk-r10e / sources / cxx-stl / gnu-libstdc ++ / 4.9 / include / bits / alloc_traits.h:399:57:来自'静态decltype(_S_construct(__ a,__ p,(forward&lt) ; _Args>)(std :: allocator_traits :: construct :: __ args)...))std :: allocator_traits< _Alloc> :: construct(_Alloc&,_Tp *,_ Args&& ...)[with _Tp = std :: _ Sp_counted_ptr_inplace,(__ gn_cxx :: _ Lock_policy)2u&gt ;; _Args = {const Eigen :: aligned_allocator}; _Alloc = Eigen :: aligned_allocator,(__ gn_cxx :: _ Lock_policy)2u>取代; decltype(_S_construct(__ a,__ p,(forward< _Args>)(std :: allocator_traits :: construct :: __ args)...))=]' android-ndk-r10e / sources / cxx-stl / gnu-libstdc ++ / 4.9 / include / bits / shared_ptr_base.h:620:37:需要来自' std :: __ shared_count< _Lp> :: __ shared_count(std :: _Sp_make_shared_tag,_Tp *,const _Alloc&,_ Args&& ...)[with _Tp = chisel :: Mesh; _Alloc = Eigen :: aligned_allocator; _Args = {}; __gnu_cxx :: _ Lock_policy _Lp =(__ nuu_cxx :: _ Lock_policy)2u]' android-ndk-r10e / sources / cxx-stl / gnu-libstdc ++ / 4.9 / include / bits / shared_ptr_base.h:1090:35:需要来自' std :: __ shared_ptr< _Tp,_Lp> :: __ shared_ptr(std :: _ Sp_make_shared_tag,const _Alloc&,_ Args&& ...)[with _Alloc = Eigen :: aligned_allocator; _Args = {}; _Tp =凿子::网格; __gnu_cxx :: _ Lock_policy _Lp =(__ nuu_cxx :: _ Lock_policy)2u]' android-ndk-r10e / sources / cxx-stl / gnu-libstdc ++ / 4.9 / include / bits / shared_ptr.h:316:64:需要来自' std :: shared_ptr< _Tp> :: shared_ptr(std ::) _Sp_make_shared_tag,const _Alloc&,_ Args&& ...)[with _Alloc = Eigen :: aligned_allocator; _Args = {}; _Tp = chisel :: Mesh]' android-ndk-r10e / sources / cxx-stl / gnu-libstdc ++ / 4.9 / include / bits / shared_ptr.h:588:39:需要来自' std :: shared_ptr< _Tp1> std :: allocate_shared(const _Alloc&,_ Args&& ...)[with _Tp = chisel :: Mesh; _Alloc = Eigen :: aligned_allocator; _Args = {}]' OpenChisel / open_chisel / src / ChunkManager.cpp:105:79:从这里需要 本征/本征/ SRC /核心/ UTIL / Memory.h:733:9:错误:使用删除功能&#39的;的std :: _ Sp_counted_ptr_inplace,(__gnu_cxx :: _ Lock_policy)2U> :: _ Sp_counted_ptr_inplace(常量性病:: _ Sp_counted_ptr_inplace ,(__ gn_cxx :: _ Lock_policy)2u>&)'
机器人-NDK-r10e /源/ CXX-STL / GNU-的libstdc ++ / 4.9 /包含/比特/ shared_ptr.h (未知)包含的文件 _Sp_counted_base(_Sp_counted_base const&)=删除; ^ class _Sp_counted_ptr_inplace final:public _Sp_counted_base< _Lp> ^
机器人-NDK-r10e /源/ CXX-STL / GNU-的libstdc ++ / 4.9 /包含/比特/ shared_ptr_base.h 信息:(494,11)'的std :: _ Sp_counted_ptr_inplace,(_gnu_cxx :: _ Lock_policy)2U> :: _ Sp_counted_ptr_inplace(常量性病:: _ Sp_counted_ptr_inplace,(_gnu_cxx :: _ Lock_policy)2U>&安培;)'被隐式删除,因为默认定义不正确: 错误:(203,图7)误差:'的std :: _ Sp_counted_base< _Lp> :: _ Sp_counted_base(常量性病:: _ Sp_counted_base< _Lp>&安培;)[用_gnu_cxx :: _ Lock_policy _Lp =(_gnu_cxx :: _ Lock_policy)2U ]'是私人的 错误:(494,11)错误:在此上下文中 错误:(494,11)错误:使用删除功能&#39的;的std :: _ Sp_counted_base< _Lp> :: _ Sp_counted_base(常量性病:: _ Sp_counted_base< _Lp>&安培;)[用_gnu_cxx :: _ Lock_policy _Lp =(_gnu_cxx: :_Lock_policy)2U]' 信息:(203,7)在此声明 make:* [app / src / main / obj / local / armeabi-v7a / objs / rgb_point_cloud_builder / / / / / _ /第三方/ OpenChisel / open_chisel / src / ChunkManager.o]错误1
我完全迷失了。任何建议都表示赞赏!
答案 0 :(得分:1)
似乎使用Eigen和shared_pointer c ++ 11的组合会导致错误。
幸运的是,有patched version of chisel使用了boost共享指针。