xLua icon indicating copy to clipboard operation
xLua copied to clipboard

Unity2021+xLua2.1.16 打安卓包报错 error: use of undeclared label

Open tripawcat opened this issue 2 years ago • 7 comments

生成的il2cpp代码会报 goto语句 使用的标签找不到定义: Assembly-CSharp347.cpp(27883,12): error: use of undeclared label 'IL_019c' goto IL_019c;

tripawcat avatar Jun 01 '23 07:06 tripawcat

是xlua的hotfix功能(注入)导致的么?如果是,你配置的类里头,排除掉出问题的类。

chexiongsheng avatar Jun 02 '23 08:06 chexiongsheng

是xlua的hotfix功能(注入)导致的么?如果是,你配置的类里头,排除掉出问题的类。

排除掉后又会出现新的 use of undeclared label,不确定是不是会一直有

tripawcat avatar Jun 04 '23 10:06 tripawcat

@chexiongsheng 会不会和NDK版本有关,Unity2021用的是ndkr21d

tripawcat avatar Jun 04 '23 10:06 tripawcat

是xlua的hotfix功能(注入)导致的么?如果是,你配置的类里头,排除掉出问题的类。

@chexiongsheng 不断的排除后,能够正常编译了。这个问题是我们从Unity2019升级到2021的时候出现的,2019没有问题,为什么2021会有问题?

tripawcat avatar Jun 05 '23 02:06 tripawcat

是xlua的hotfix功能(注入)导致的么?如果是,你配置的类里头,排除掉出问题的类。

排除掉后又会出现新的 use of undeclared label,不确定是不是会一直有

应该和ndk没关吧。可能和il2cpp关系大些。这些出问题的C#函数有什么共同点呢?

chexiongsheng avatar Jun 06 '23 02:06 chexiongsheng

@chexiongsheng image 我这出现了,看了下cpp文件,对应的label就在后面。

image 应该就是这个_ctor 构造函数?
这个构造函数时abstract的类的 image

反编译是这样的。_c__Hotfix0_ctor是不是应该在if (downloadList == null)的上面 image

liuyi13-cpu avatar Feb 20 '24 12:02 liuyi13-cpu