libretro / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
70 stars 77 forks source link

[HowTo] How to build it for iOS and VisionOS #289

Closed Phantomxm2021 closed 9 months ago

Phantomxm2021 commented 9 months ago

We are developing an emulator for VisionOS but we don't know how to build it from source. Does anyone know?

warmenhoven commented 9 months ago

Every core in the libretro project that is built and available on the buildbot uses the gitlab CI infrastructure. They all have a .gitlab-ci.yml file, and almost all of them reference the helper template scripts.

For iOS for mgba, the command that is executed is: make -C . -f Makefile.libretro platform=ios-arm64

Phantomxm2021 commented 9 months ago

Every core in the libretro project that is built and available on the buildbot uses the gitlab CI infrastructure. They all have a .gitlab-ci.yml file, and almost all of them reference the helper template scripts.

For iOS for mgba, the command that is executed is: make -C . -f Makefile.libretro platform=ios-arm64

Thanks. But when I build for iOS I get a nerror, do you know how to fix it?

ld: building for 'iOS', but linking in object file (/Users/xxx/Downloads/mgba-master/src/arm/arm.o) built for 'macOS'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mgba_libretro_ios.dylib] Error 1
warmenhoven commented 9 months ago

make clean

Looks like you previously built it for macOS. The intermediary files go to the same place for all platforms so anytime you change your platform you'll need to clean first.