Skip to content

Commit

Permalink
Add compile guide for M-chip Mac (#63)
Browse files Browse the repository at this point in the history
* Update README.md

Add troubleshooting guidance for M-chip Mac.

* Update README.md

---------

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
  • Loading branch information
e7h4n and kisvegabor committed Mar 25, 2024
1 parent 788ff39 commit b68b2d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ On MacOS you need to include (uncomment in provided example platformio.ini file)
!find /opt/homebrew/Cellar/sdl2 -name "libSDL2.a" | xargs dirname | sed "s/^/-L /"
```

If you get the following error on M-chip Mac with VSCode, you can add `-arch arm64` to `build_flags` in `platformio.ini` or just run `pio run -e emulator_64bits -t execute` in the system Python environment. (`pio` should be installed in system Python first).
```
ld: warning: ignoring file '/opt/homebrew/Cellar/sdl2/2.30.1/lib/libSDL2-2.0.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: Undefined symbols:
_SDL_CreateRenderer, referenced from:
_window_create in sdl.o
...
```


**Windows**

Use [MSYS2](https://www.msys2.org/)
Expand Down

0 comments on commit b68b2d8

Please sign in to comment.