Building on Arm64 macOS using cmake throws an error. #2522
Replies: 2 comments
-
Axmol not support cmake generator other than |
Beta Was this translation helpful? Give feedback.
-
✅ TL;DRIf you're using Ninja on macOS and get ARC (
To fix the ARC error in my project, I added this: #if XCODE
__weak AVPlayer* player = _player;
#else
__unsafe_unretained AVPlayer* player = _player;
#endif Axmol doesn’t officially support the Ninja generator on Apple platforms, so I won’t be sending a PR for this. Personally, I prefer Ninja because it's much faster during development. So I use the workaround above, and switch to the Xcode generator when needed (e.g. for ARC support). ✅ Recommended FixIf you're having the same issue, the better solution is to switch to the Xcode generator. 👉 If you're using VSCode with the CMake Tools extension:You can change the generator from the settings: 👉 If you're using the terminal, you can make Xcode the default generator by adding this line to your shell config (
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Steps to Reproduce:
mkdir build && cd build
cmake ..
make
axmol/core/media/AvfMediaEngine.mm
file, Line number 368.Solution:
Notes:
-fobjc-arc
flag is applied to the mm files. The proper solution will be to use the same for other builders.Beta Was this translation helpful? Give feedback.
All reactions