混编库

iOS中连接混编C++库的编译问题

戏子无情 提交于 2020-03-03 21:44:27
问题 重新封装画板内核库后,所有的混编文件(.mm)都被打包到了库中,外面应用层代码全部都是 OC 文件(.m)。这时候编译工程会出现如下连接错误: Undefined symbols for architecture arm64: "vtable for __cxxabiv1::__vmi_class_type_info", referenced from: ... NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*)", referenced from: ... "___cxa_pure_virtual", referenced from: ... "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string<char, std::__1: