oc调用c++接口时 报错 Undefined symbols for architecture i386:

当在oc中调用c++中的方法时,发现说c++中的方法没定义或是找不到

Undefined symbols for architecture i386:
"_desTYData", referenced from:
-[TuYoo encryptParametersWithDict:] in libtuyoo.a(TuYoo.o)
ld: symbol(s) not found fo

记得c++中的方法定义是要这样定义的

extern"C" {

    const char *desTYData(const char *str);

}

而且把调用c++方法得.m文件改为.mm就可以了

原文地址:https://www.cnblogs.com/wudan7/p/3728647.html