EDIT: This is resolved. The issue was that the simulator output wasn't building for both Intel and M1 archs.
I'm trying to share a .pdx
with others so they can run it in the Simulator -- but it's failing to load for them.
Notes:
- We are both on macOS/Apple Silicon, with latest SDK
1.12.3
- I don't think it should matter, but I'm on
macOS 12.5
and they are on11.6
- I don't think it should matter, but I'm on
- Both my own project and SDK example projects (eg: Hello World) fail in the same way
Problem:
dlopen
complains with:
dlopen(/path/to/game.pdex/pdex.dylib, 6): no suitable image found. Did find:
/path/to/game.pdex/pdex.dylib: mach-o, but wrong architecture
/path/to/game.pdex/pdex.dylib: mach-o, but wrong architecture
My dev setup is like:
- macOS 12.5
- Using Makefile from the SDK like:
HEAP_SIZE = 8388208
STACK_SIZE = 61800
PRODUCT = game.pdx
# Locate the SDK
SDK = ${PLAYDATE_SDK_PATH}
ifeq ($(SDK),)
SDK = $(shell egrep '^\s*SDKRoot' ~/.Playdate/config | head -n 1 | cut -c9-)
endif
ifeq ($(SDK),)
$(error SDK path not found; set ENV value PLAYDATE_SDK_PATH)
endif
VPATH += Source
# List C source files here
SRC = \
source \
here
# List all user directories here
UINCDIR =
# List user asm files
UASRC =
# List all user C define here, like -D_DEBUG=1
UDEFS =
# Define ASM defines here
UADEFS =
# List the user directory to look for the libraries here
ULIBDIR =
# List all user libraries here
ULIBS =
I thought it might have been a quarantining issue, as if you open a pdx
downloaded from the internet via Finder, macOS sometimes quarantines the dylib contained within the pdx
bundle but that's not it. Even after removing the quarantine bit, the issue persists.
Other projects found here/on the web do work for them - so this seems to be a "built by me" issue.
Any suggestions on things to try? I would have expected the example C projects to "just work".