-
-
Notifications
You must be signed in to change notification settings - Fork 250
Closed
Description
- axmol version: 2.5.9
- devices test on: MacBook Air M3
- developing environments
- NDK version: r23c
- Xcode version: 16.3
- cmake version: 4.0.1
- VS Code: 1.99.3
- The default cmake project generator is "Unix Makefiles"
Steps to Reproduce:
- Create a new project using axmol CLI.
- Create a build directory and navigate into it using:
mkdir build && cd build - Generate build files using cmake:
cmake .. - Build the project using
make - It will fail to build and throw an error in the
axmol/core/media/AvfMediaEngine.mmfile, Line number 368.
Solution:
- Replacing __weak with __unsafe_unretained fixes the problem.
Notes:
- Building using the Xcode generator works without any problem.
- I'm using VSCode, which does not use Xcode generator to create a project by default.
- An error is thrown because the project is using ARC-style code with manual memory management for .mm files. For Xcode, it is working fine because the
-fobjc-arcflag is applied to the mm files. The proper solution will be to use the same for other builders.
Metadata
Metadata
Assignees
Labels
No labels