2 zhaochenzhao92 zhaochenzhao92 于 2014.11.26 17:17 提问

Unity、iOS交互时,Unity调用iOS出错
Undefined symbols for architecture armv7:
"__PressButton1", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"__PressButton0", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

求助 要怎么解决啊?

4个回答

zhaochenzhao92
zhaochenzhao92   2014.11.26 17:18

我在unity里面注册了两个函数:
public class SDK

{

[DllImport("__Internal")]

private static extern void _PressButton0 (int RMB);

     public static void ActivateButton0 (int RMB)     
     {       
        _PressButton0 (RMB);     
     }     

     [DllImport("__Internal")]     
     private static extern void _PressButton1 ();     

     public static void ActivateButton1 ()     
     {     

        _PressButton1 ();     
     }     
} 
u011757360
u011757360   2014.11.30 22:57

这是Xcode报的错?Xcode debug时,如果develop target版本与手机版本对不上会报这种architecture的错

u011757360
u011757360   2014.11.30 22:59

补充一下,unity调用Xcode封装的函数,声明时需要用extern "C";

baidu_25743639
baidu_25743639   2017.06.24 14:10

楼主解决了吗,怎么处理的

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!