Closed deveshd020 closed 4 years ago
Hi @deveshd020, did you install SDL2 and its additional libraries (such as SDL2_image,
SDL2_mixerand
SDL2_ttf`)? Which Linux distribution are you running this on?
Hi @deveshd020, did you install SDL2 and its additional libraries (such as
SDL2_image,
SDL2_mixerand
SDL2_ttf`)? Which Linux distribution are you running this on?
i m using ubuntu 18.04.0, and had installed : libsdl2{,-image,-mixer,-ttf,-gfx}-dev.
Hi @deveshd020, what kind of device are you running this on? I noticed that you are running on a 32-bit version of Ubuntu. How did you get Ubuntu 18.04 32-bit version? The issue doesn't occur to me even when I set GOARCH
to 386
and there is no 32-bit version of Ubuntu 18.04 on the official website as far as I can tell. Any additional information would be helpful as well!
when i do, go get -v github.com/veandco/go-sdl2/{sdl,img,mix,ttf}
/tmp/go-build182250740/b001/_x038.o: In function
_cgo_16a2af4b4be1_Cfunc_SDL_ShowSimpleMessageBox': /tmp/go-build/cgo-gcc-prolog:1198: undefined reference to
SDL_ShowSimpleMessageBox' /tmp/go-build182250740/b001/_x038.o: In function_cgo_16a2af4b4be1_Cfunc_SDL_ShowWindow': /tmp/go-build/cgo-gcc-prolog:1213: undefined reference to
SDL_ShowWindow' /tmp/go-build182250740/b001/_x038.o: In function_cgo_16a2af4b4be1_Cfunc_SDL_UpdateWindowSurface': /tmp/go-build/cgo-gcc-prolog:1228: undefined reference to
SDL_UpdateWindowSurface'golang_projects/src/github.com/veandco/go-sdl2/sdl/events.c:18: undefined reference to
SDL_FilterEvents' /tmp/go-build182250740/b001/_x040.o: In function
addEventWatch': golang_projects/src/github.com/veandco/go-sdl2/sdl/events.c:23: undefined reference toSDL_AddEventWatch' /tmp/go-build182250740/b001/_x040.o: In function
delEventWatch': golang_projects/src/github.com/veandco/go-sdl2/sdl/events.c:28: undefined reference toSDL_DelEventWatch' /tmp/go-build182250740/b001/_x040.o: In function
PollEvent': golang_projects/src/github.com/veandco/go-sdl2/sdl/events.c:33: undefined reference toSDL_PollEvent' /tmp/go-build182250740/b001/_x041.o: In function
addHintCallback': golang_projects/src/github.com/veandco/go-sdl2/sdl/hints.c:13: undefined reference toSDL_AddHintCallback' /tmp/go-build182250740/b001/_x041.o: In function
delHintCallback': golang_projects/src/github.com/veandco/go-sdl2/sdl/hints.c:18: undefined reference toSDL_DelHintCallback' /tmp/go-build182250740/b001/_x042.o: In function
LogSetOutputFunction': golang_projects/src/github.com/veandco/go-sdl2/sdl/log.c:5: undefined reference to `SDL_LogSetOutputFunction' collect2: error: ld returned 1 exit statusI'm getting undefined reference to....issue... my go env: GOARCH="386" GOBIN="" GOCACHE="/home/deveshd020/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="386" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/deveshd020/golang_projects" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_386" GCCGO="/usr/bin/gccgo" GO386="sse2" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build180285164=/tmp/go-build -gno-record-gcc-switches"