所以我正在使用3dar SDK,构建一个实现sdk和生成的SM3Dar.h头的独立应用程序没有问题。但是现在我正在尝试使用相同的sdk作为更大项目的一部分,它似乎没有正常运行。看起来它知道头文件在那里但是没有与那个和库正确通信。我正试图在iPhone 5上运行它,我有最新的XCode。
但我收到这些错误
Undefined symbols for architecture armv7s:
"**___cxa_pure_virtual", referenced from**:
vtable for Comparable in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
"**vtable for __cxxabiv1::__si_class_type_info", referenced from:**
typeinfo for ComboVertex in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
typeinfo for ObjDB in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(ObjDB.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
**"operator new[](unsigned long)", referenced from:**
Array<FloatPolygon>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<FloatVertex>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<CString>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(ObjFile.o)
Array<Vector3>::resize(int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
Array<Vector3>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
Array<unsigned char>::resize(int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
Array<unsigned char>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
...
**"std::terminate()", referenced from:**
+[Geometry newOBJFromResource:] in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
FloatObject::~FloatObject() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<FloatPolygon>::~Array() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
FloatObject::FloatObject() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<FloatPolygon>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
read_obj(GeometryInterface*, char const*) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(ObjFile.o)
Array<CString>::~Array() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(ObjFile.o)
...
**"operator delete[](void*)", referenced from:**
RunningAverage<Vector3>::~RunningAverage() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(CoordinateSystemAPI.o)
Array<FloatVertex>::~Array() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<FloatPolygon>::~Array() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<FloatPolygon>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<FloatVertex>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<CString>::~Array() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(ObjFile.o)
Array<CString>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(ObjFile.o)
...
**"vtable for __cxxabiv1::__class_type_info", referenced from:**
typeinfo for Comparable in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
typeinfo for GeometryInterface in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(GeometryInterface.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
****"___cxa_guard_abort", referenced from:****
Vector2::zero() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
Vector3::zero() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
**"___gxx_personality_sj0", referenced from:**
+[Geometry newOBJFromResource:] in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
FloatObject::~FloatObject() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<FloatPolygon>::~Array() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
FloatObject::FloatObject() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<FloatPolygon>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
Array<FloatVertex>::Array(int, int) in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
+[SM3DARSession sharedInstance] in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(SM3DARSession.o)
...
**"___cxa_guard_acquire", referenced from:**
Vector2::zero() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
Vector3::zero() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
"___cxa_guard_release", referenced from:
Vector2::zero() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
Vector3::zero() in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(FloatObject.o)
"std::ios_base::Init::~Init()", referenced from:
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(SM3DARController.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(SM3DARPointOfInterest.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(CoordinateSystemAPI.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Matrix4.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Matrix3.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(SM3DARPointView.o)
...
"std::ios_base::Init::Init()", referenced from:
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(SM3DARController.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(SM3DARPointOfInterest.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(CoordinateSystemAPI.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Geometry.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Matrix4.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(Matrix3.o)
___cxx_global_var_init in lib3DAR_v23_2012_12_06_DistributionPatch_2013_05_18.a(SM3DARPointView.o)
...
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:12)
答案 1 :(得分:0)
我相信这个库只是为armv7而不是armv7s而构建的。要确认这是问题,请将项目配置为仅在项目构建设置中为armv7构建,并查看是否有效。如果是这种情况,您可以选择获取库的更新版本或仅为armv7构建代码。