Skip to content

Commit 954bcb3

Browse files
committed
更新 xcode升级到15.x版本后zlib库中的编译错误相关文档
1 parent 32cf14b commit 954bcb3

4 files changed

Lines changed: 27 additions & 11 deletions

File tree

docs/help/commonerrors.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,16 @@ WebGL使用全局安装,你没有将本地`{project}/HybridCLRData/LocalIl2Cpp
252252
在热更新代码中定义的添加了`[MonoPInvokeCallback]`特性的函数不支持string或者数组之类的参数或者返回值,请将相应参数修改为IntPtr同时自行marshal这些参数,或者将该函数移到AOT中定义。
253253
详细请见[MonoPInvokCallback支持](../basic/monopinvokecallback)
254254

255-
### 升级到最新版本xcode后出现发布ios平台时出现 stdio.h头文件中fopen函数的编译错误
255+
### 升级到最新版本xcode后发布ios平台时在stdio.h(或_studio)头文件中出现fopen函数相关或`unexpectd )`之类的编译错误
256256

257257
在升级xcode 15.x版本后出现跟zlib的不兼容问题。解决办法有两个:
258258

259259
- xcode回退到13.x版本
260-
- zlib升级到最新版本,替换`{project}/HybridCLRData/LocalIl2CppData-{platform}/il2cpp/external/zlib`目录的代码,清理Library缓存后重新打包
260+
- zlib升级到最新版本,具体操作如下:
261+
-[zlib官网](https://zlib.net) 下载最新版本的[zlib源码](https://zlib.net/current/zlib.tar.gz)。如果最新版本仍然遇到问题(可能性不高),请下载我们已经验证过的1.3.2版本。
262+
- 解压代码压缩包,删除根目录下除了 `.h``.c`文件以外的所有文件(此操作**可选**,不影响构建)。
263+
- 使用刚刚解压的zlib的源码目录替换`{project}/HybridCLRData/LocalIl2CppData-{platform}/il2cpp/external/zlib`目录的代码。
264+
- 清理Library缓存后重新打包。
261265

262266
## 运行时错误
263267

i18n/en/docusaurus-plugin-content-docs/current/help/commonerrors.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,16 @@ Extern functions defined in hot update code don't support parameters or return v
251251
Functions with `[MonoPInvokeCallback]` attribute defined in hot update code don't support parameters or return values like string or arrays. Please modify the corresponding parameters to IntPtr and manually marshal these parameters, or move the function to AOT for definition.
252252
For details, see [MonoPInvokCallback Support](../basic/monopinvokecallback).
253253

254-
### After upgrading to the latest version of Xcode, a compilation error occurs with the fopen function in the stdio.h header when publishing for the iOS platform After upgrading to Xcode 15.x
254+
### Compilation errors related to `fopen` or messages like `unexpected )` appearing in `stdio.h` (or `_stdio`) when building for iOS after upgrading to the latest Xcode
255255

256-
an incompatibility issue with zlib arises. There are two solutions:
256+
After upgrading to Xcode 15.x, compatibility issues with zlib may occur. There are two possible solutions:
257257

258258
- Roll back Xcode to version 13.x
259-
260-
- Upgrade zlib to the latest version by replacing the code in the `{project}/HybridCLRData/LocalIl2CppData-{platform}/il2cpp/external/zlib` directory. clean build cache in Library. rebuild your game.
259+
- Upgrade zlib to the latest version. The steps are as follows:
260+
- Download the latest version of the zlib source code from the official website: https://zlib.net (e.g., https://zlib.net/current/zlib.tar.gz). If the latest version still encounters issues (unlikely), please use version 1.3.2, which we have already verified.
261+
- Extract the archive, and remove all files in the root directory except for `.h` and `.c` files (this step is **optional** and does not affect the build).
262+
- Replace the contents of `{project}/HybridCLRData/LocalIl2CppData-{platform}/il2cpp/external/zlib` with the extracted zlib source code.
263+
- Clear the Library cache and rebuild the project.
261264

262265
## Runtime Errors
263266

i18n/en/docusaurus-plugin-content-docs/version-8.5.0/help/commonerrors.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,16 @@ Extern functions defined in hot update code don't support parameters or return v
251251
Functions with `[MonoPInvokeCallback]` attribute defined in hot update code don't support parameters or return values like string or arrays. Please modify the corresponding parameters to IntPtr and manually marshal these parameters, or move the function to AOT for definition.
252252
For details, see [MonoPInvokCallback Support](../basic/monopinvokecallback).
253253

254-
### After upgrading to the latest version of Xcode, a compilation error occurs with the fopen function in the stdio.h header when publishing for the iOS platform After upgrading to Xcode 15.x
254+
### Compilation errors related to `fopen` or messages like `unexpected )` appearing in `stdio.h` (or `_stdio`) when building for iOS after upgrading to the latest Xcode
255255

256-
an incompatibility issue with zlib arises. There are two solutions:
256+
After upgrading to Xcode 15.x, compatibility issues with zlib may occur. There are two possible solutions:
257257

258258
- Roll back Xcode to version 13.x
259-
260-
- Upgrade zlib to the latest version by replacing the code in the `{project}/HybridCLRData/LocalIl2CppData-{platform}/il2cpp/external/zlib` directory. clean build cache in Library. rebuild your game.
259+
- Upgrade zlib to the latest version. The steps are as follows:
260+
- Download the latest version of the zlib source code from the official website: https://zlib.net (e.g., https://zlib.net/current/zlib.tar.gz). If the latest version still encounters issues (unlikely), please use version 1.3.2, which we have already verified.
261+
- Extract the archive, and remove all files in the root directory except for `.h` and `.c` files (this step is **optional** and does not affect the build).
262+
- Replace the contents of `{project}/HybridCLRData/LocalIl2CppData-{platform}/il2cpp/external/zlib` with the extracted zlib source code.
263+
- Clear the Library cache and rebuild the project.
261264

262265
## Runtime Errors
263266

versioned_docs/version-8.5.0/help/commonerrors.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,16 @@ WebGL使用全局安装,你没有将本地`{project}/HybridCLRData/LocalIl2Cpp
254254

255255
### 升级到最新版本xcode后出现发布ios平台时出现 stdio.h头文件中fopen函数的编译错误
256256

257+
### 升级到最新版本xcode后发布ios平台时在stdio.h(或_studio)头文件中出现fopen函数相关或`unexpectd )`之类的编译错误
258+
257259
在升级xcode 15.x版本后出现跟zlib的不兼容问题。解决办法有两个:
258260

259261
- xcode回退到13.x版本
260-
- zlib升级到最新版本,替换`{project}/HybridCLRData/LocalIl2CppData-{platform}/il2cpp/external/zlib`目录的代码,清理Library缓存后重新打包
262+
- zlib升级到最新版本,具体操作如下:
263+
-[zlib官网](https://zlib.net) 下载最新版本的[zlib源码](https://zlib.net/current/zlib.tar.gz)。如果最新版本仍然遇到问题(可能性不高),请下载我们已经验证过的1.3.2版本。
264+
- 解压代码压缩包,删除根目录下除了 `.h``.c`文件以外的所有文件(此操作**可选**,不影响构建)。
265+
- 使用刚刚解压的zlib的源码目录替换`{project}/HybridCLRData/LocalIl2CppData-{platform}/il2cpp/external/zlib`目录的代码。
266+
- 清理Library缓存后重新打包。
261267

262268
## 运行时错误
263269

0 commit comments

Comments
 (0)