You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Howdy, ladies and gentlemen! Hope you're doing great.
I'm having an dependency issue trying to cross-compile to android, while importing a 3rd party library (go-sdl2, I opened a issue there as well). A vanilla gomobile app build just fine targeting android/arm, also regular x86 build including go-sdl2 also works fine.
It is probably not issue of the gomobile toolchain, maybe the build steps get lost after a certain level of indirection?
My program include go-sdl2, which contains sdl/mouse.go, which include <SDL_syswm.h>, which include <X11/Xlib.h>. I don't have experience building C programs, so I beg pardon if it is a trivial mistake.
A quick spoiler of the build error.
...
pack r $WORK/golang.org/x/mobile/app.a $WORK/golang.org/x/mobile/app/_obj/_all.o # internal
# github.com/veandco/go-sdl2/sdl
In file included from ../../veandco/go-sdl2/sdl/mouse.go:9:
/usr/include/SDL2/SDL_syswm.h:72:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
^~~~~~~~~~~~
1 error generated.
What version of Go are you using (go version)?
go1.9 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
...
pack r $WORK/golang.org/x/mobile/app.a $WORK/golang.org/x/mobile/app/_obj/_all.o # internal
# github.com/veandco/go-sdl2/sdl
In file included from ../../veandco/go-sdl2/sdl/mouse.go:9:
/usr/include/SDL2/SDL_syswm.h:72:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
^~~~~~~~~~~~
1 error generated.
All the best!
The text was updated successfully, but these errors were encountered:
You are linking against the linux's SDL instead of the android version. You first need to figure out how to compile SDL with the NDK and then how to get gomobile to use that version instead of the system's. Why are you using both of them together btw.
Howdy, ladies and gentlemen! Hope you're doing great.
I'm having an dependency issue trying to cross-compile to android, while importing a 3rd party library (go-sdl2, I opened a issue there as well). A vanilla gomobile app build just fine targeting android/arm, also regular x86 build including go-sdl2 also works fine.
It is probably not issue of the gomobile toolchain, maybe the build steps get lost after a certain level of indirection?
My program include go-sdl2, which contains sdl/mouse.go, which include <SDL_syswm.h>, which include <X11/Xlib.h>. I don't have experience building C programs, so I beg pardon if it is a trivial mistake.
A quick spoiler of the build error.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?What did you do?
Here's my X11 lib in place:
And my env variables.
What did you expect to see?
The runegrid.apk outputed correctly
What did you see instead?
All the best!
The text was updated successfully, but these errors were encountered: