Cross-compiling
Compiling an nk-based application for a different operating system can be a complicated process due to its requirement to use CGo to communicate with native OpenGL libraries. However, if you've worked through Chapter 5, andlabs UI - Cross-platform Native UIs, or Chapter 8, Shiny - Experimental Go GUI API, this should already be set up. If you've jumped straight to this chapter, then you may need to follow the steps in the Appendix, in the Cross-Compiler Setup. Once that's complete, you should have new compilers available (named o32-clang for macOS or x86_64-w64-mingw32-gcc for Windows) that are able to link to macOS Foundation APIs and Windows system calls respectively.
To build the application, we now set up the GOOS and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access