Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mobile (Android) support #56

Open
duysqubix opened this issue Oct 10, 2023 · 0 comments
Open

Mobile (Android) support #56

duysqubix opened this issue Oct 10, 2023 · 0 comments

Comments

@duysqubix
Copy link
Contributor

Hi,

there will be any mobile (Android at least) support?

I tryed to execute "gomobile install github.com/my/awesome/game" with the code similar to the one below :

...
func main() {
	app.Main(func(a app.App) {
		for e := range a.Events() {
			switch e := a.Filter(e).(type) {
			case lifecycle.Event:
                            ...
			case size.Event:
                            ...
			case paint.Event:
				pixelgl.Run(myGame.Run) // Where myGame.Run executes the pixelgl game and draws stuff with "window, err := pixelgl.NewWindow(cfg)" object
			case touch.Event:
                            ...
			}
		}
	})
}
...

This generates the following error:

`
gomobile: go build -buildmode=c-shared -o /var/folders/sv/v711qrdx14vbpq03112_llx40000gn/T/gomobile-work-227749453/lib/armeabi-v7a/libmobile.so github.com/my/awesome/game/src/game/mobile failed: exit status 2
# github.com/my/awesome/game/vendor/github.com/go-gl/glfw/v3.2/glfw
In file included from vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go:4:
In file included from ./glfw/src/context.c:28:
In file included from ./glfw/src/internal.h:169:
./glfw/src/x11_platform.h:36:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
^~~~~~~~~~~~
1 error generated.
# github.com/my/awesome/game/vendor/github.com/go-gl/gl/v3.3-core/gl
vendor/github.com/go-gl/gl/v3.3-core/gl/procaddr.go:52:11: fatal error: 'GL/glx.h' file not found
#include <GL/glx.h>
^~~~~~~~~~
1 error generated.

`
At this moment I guess I need xquarz in order to avoid this problem.

Anyhow, I'd like to know what I need to do in order to run my game on android (or iOS).

Original issue: faiface/pixel#179

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant