cimgui-go icon indicating copy to clipboard operation
cimgui-go copied to clipboard

android how do build?

Open aadog opened this issue 2 years ago • 5 comments

android how do build?

aadog avatar Apr 20 '23 14:04 aadog

This should be easy but, since I was trying some time ago, I can say it isn't :smile: Let me determine what needs to be done to compile against android:

  • First of all, we need to answer the following question:
:heavy_check_mark: does glfw and sdl support android?ChatGPT: Yes, both GLFW and SDL support Android.

SDL has an official Android port and provides a simple interface for developing games and applications that run on Android devices. GLFW also has an Android port, which allows for the creation of cross-platform applications that run on multiple platforms, including Android.

Both libraries provide support for input handling, audio, graphics, and window management, making them suitable for game development and other interactive applications on the Android platform.

  • now we need to find android C and C++ compiler
  • we need to compile shared library for android (these from lib folder as well as glfw/sdl)
  • and finally some additional cgo flags may be necessary

and the command should be as follows GOOS=android GOARCH=arm64 CC="<android c compiler>" CXX="android C++ compiler" go build .

gucio321 avatar Apr 20 '23 15:04 gucio321

ref: https://developer.android.com/ndk/guides/

gucio321 avatar Apr 20 '23 15:04 gucio321

@gucio321 Did you find an answer on this?

paralin avatar Nov 14 '23 18:11 paralin

nope as I didn't need it yet However I suppose it wouldn't work with glfw... (we'd need to add some other backend

gucio321 avatar Nov 14 '23 18:11 gucio321

should work with ebiten now just need to compile

gucio321 avatar Sep 17 '24 14:09 gucio321