Skip to content

Commit

Permalink
Update README.md with instructions for cross-compiling from Linux to …
Browse files Browse the repository at this point in the history
…macOS

Signed-off-by: Lilis Iskandar <[email protected]>
  • Loading branch information
veeableful committed Mar 21, 2021
1 parent cd80a89 commit 8b64041
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ Before building the program.
6. Before running the program, you need to put `SDL2.dll` from the [SDL2 runtime package](http://libsdl.org/download-2.0.php) (For others like *SDL_image*, *SDL_mixer*, etc.., look for them [here](https://www.libsdl.org/projects/)) for Windows in the same folder as your executable.
7. Now you should be able to run the program using Wine or Windows!

### Linux to macOS
1. Install macOS toolchain via [osxcross](https://github.com/tpoechtrager/osxcross)
2. Run the following build command (replace the values in parentheses):
```
CGO_ENABLED=1 CC=[path-to-osxcross]/target/bin/[arch]-apple-darwin[version]-clang GOOS=darwin GOARCH=[arch] go build -tags static -ldflags "-s -w" -a
```

# FAQ
__Why does the program not run on Windows?__
Expand Down

0 comments on commit 8b64041

Please sign in to comment.