Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unity] Bug: Unity2022下2.0生成的ios项目编译报错 #1428

Closed
3 tasks done
dunadain opened this issue Jul 11, 2023 · 6 comments
Closed
3 tasks done

[Unity] Bug: Unity2022下2.0生成的ios项目编译报错 #1428

dunadain opened this issue Jul 11, 2023 · 6 comments
Assignees
Labels
bug Something isn't working Unity

Comments

@dunadain
Copy link
Contributor

前置阅读 | Pre-reading

Puer的版本 | Puer Version

2.0.0.pre5

Unity的版本 | Unity Version

2022.3.0

发生在哪个平台 | Platform

Editor(mac)

错误信息 | Error Message

image

问题重现 | Bug reproduce

建个新的项目引入puerts,build ios就行了

@dunadain dunadain added bug Something isn't working Unity labels Jul 11, 2023
@zombieyang
Copy link
Contributor

多引入了一份baselib?

@dunadain
Copy link
Contributor Author

image
image
不知道哪里多引用了。。我已经把里面baselib都删了还是报

@dunadain
Copy link
Contributor Author

建的空项目

@zombieyang zombieyang changed the title [Unity] Bug: 2.0生成的ios项目编译报错 [Unity] Bug: Unity2022下2.0生成的ios项目编译报错 Jul 11, 2023
@zombieyang
Copy link
Contributor

zombieyang commented Jul 12, 2023

两个办法可以解决:

  1. 在xcode中添加这个definition:-DBASELIB_INLINE_NAMESPACE=il2cpp_baselib
  2. 在xcode项目Class/Preprocessor.h加入一行#define BASELIB_INLINE_NAMESPACE il2cpp_baselib

暂时没有找到办法可以在普洱层面一劳永逸地解决,如果有朋友知道方案可以贡献出来。


There are two ways to solve this issue:

  1. add this definition in xcode setting:-DBASELIB_INLINE_NAMESPACE=il2cpp_baselib.
  2. add this code:#define BASELIB_INLINE_NAMESPACE il2cpp_baselib in the end of <xcodeproject>/Class/Preprocessor.h

I did not find a way to solve this issue in PuerTS's code. If someone know any resolution please tell me.

@dunadain
Copy link
Contributor Author

是因为引用了俩个?

@zombieyang
Copy link
Contributor

是因为引用了俩个?

看一下产生歧义的两个h,以及Baselib.h就知道了。加了这个宏,两边就位于同一个namespace下,没加就不是。看了2021的xcode项目是有这个宏定义的,不知道2022怎么去掉了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Unity
Projects
None yet
Development

No branches or pull requests

2 participants