ebitengine / oto

♪ A low-level library to play sound on multiple platforms ♪
Apache License 2.0
1.51k stars 128 forks source link

undefined: context when trying to run the example. #238

Closed vavakado closed 2 weeks ago

vavakado commented 2 weeks ago

Here is the error.

# github.com/ebitengine/oto/v3
/home/vavakado/go/pkg/mod/github.com/ebitengine/oto/v3@v3.1.0/context.go:38:11: undefined: context
/home/vavakado/go/pkg/mod/github.com/ebitengine/oto/v3@v3.1.0/context.go:100:21: undefined: newContext
hajimehoshi commented 2 weeks ago

More information is needed, but I guess you are trying to cross-compile but without CGO_ENABLED=1

vavakado commented 2 weeks ago

Weird, I wasn't crosscompiling but setting CGO_ENABLED=1 indeed helped.