Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Build SDL2 error #80

Open
newtorn opened this issue May 29, 2020 · 1 comment
Open

Build SDL2 error #80

newtorn opened this issue May 29, 2020 · 1 comment

Comments

@newtorn
Copy link

newtorn commented May 29, 2020

OUTPUT_DIR=./bin
TARGET=hello
CGO_ENABLED=1
CC=x86_64-linux-musl-gcc
GOOS=linux
buildForLinux:
	@env CGO_ENABLED=$(CGO_ENABLED) CC=$(CC) GOOS=$(GOOS) go build -x -ldflags "-w" -o $(OUTPUT_DIR)/$(TAGRET).exe
$ make buildForLinux
WORK=/var/folders/b8/zx8rbjf513x5n2wy64fg7n000000gn/T/go-build818172395
mkdir -p $WORK/b029/
cd /Users/newtorn/go/pkg/mod/github.com/veandco/[email protected]/sdl
pkg-config --cflags -- sdl2
pkg-config --libs -- sdl2
CGO_LDFLAGS='"-g" "-O2" "-L/usr/local/lib" "-lSDL2"' /usr/local/Cellar/go/1.12.5/libexec/pkg/tool/darwin_amd64/cgo -objdir $WORK/b029/ -importpath github.com/veandco/go-sdl2/sdl -- -D_THREAD_SAFE -I/usr/local/include/SDL2 -I $WORK/b029/ -g -O2 ./audio.go ./blendmode.go ./clipboard.go ./cpuinfo.go ./endian.go ./error.go ./events.go ./filesystem.go ./gamecontroller.go ./gesture.go ./haptic.go ./hints.go ./joystick.go ./keyboard.go ./keycode.go ./loadso.go ./log.go ./mouse.go ./mutex.go ./pixels.go ./power.go ./rect.go ./render.go ./rwops.go ./scancode.go ./sdl.go ./sdl_cgo.go ./sensor.go ./surface.go ./sysrender.go ./system.go ./syswm.go ./thread.go ./timer.go ./touch.go ./version.go ./video.go ./vulkan.go
# github.com/veandco/go-sdl2/sdl
In file included from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/mouse.go:9:
/usr/local/include/SDL2/SDL_syswm.h:232:65: error: missing binary operator before token "("
  232 | #if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)
      |                                                                 ^
make: *** [buildForLinux] Error 2
@rofl0r
Copy link
Collaborator

rofl0r commented Jul 5, 2020

how is this related to this project ?

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

No branches or pull requests

2 participants