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

Cannot compile on Windows due to several issues #93

Open
Sparkwave2 opened this issue Aug 23, 2023 · 1 comment
Open

Cannot compile on Windows due to several issues #93

Sparkwave2 opened this issue Aug 23, 2023 · 1 comment

Comments

@Sparkwave2
Copy link

When trying to compile using go run ./ the following errors display:

github.com/veandco/go-sdl2/gfx: build constraints exclude all Go files in C:\Users\Plazm\go\pkg\mod\github.com\veandco\go-sdl2@v0.4.35\gfx
github.com/veandco/go-sdl2/img: build constraints exclude all Go files in C:\Users\Plazm\go\pkg\mod\github.com\veandco\go-sdl2@v0.4.35\img
github.com/veandco/go-sdl2/ttf: build constraints exclude all Go files in C:\Users\Plazm\go\pkg\mod\github.com\veandco\go-sdl2@v0.4.35\ttf

I tried compiling using go run ./build_script/main.go -b and it behaved differently, instead outputting this

< Beginning build to "bin\windows-0.8-Release-64" for windows. >
<Assets copied.>
<Building binary with args:  [go build -ldflags -s -w -H windowsgui -tags release -o bin\windows-0.8-Release-64\MasterPlan.exe ./] .>
<ERROR:  exit status 1>
< Beginning build to "bin\windows-0.8-Demo-64" for windows. >
<Assets copied.>
<Building binary with args:  [go build -ldflags -s -w -H windowsgui -tags demo -o bin\windows-0.8-Demo-64\MasterPlan.exe ./] .>
<ERROR:  exit status 1>

My Go version is 1.21.0, and I'm building this on Windows 10

@skejeton
Copy link
Contributor

skejeton commented Feb 1, 2024

Same issue, you have to follow instructions in go-sdl2 go module on installing SDL2 for MinGW. The issue would be resolved except for one - it also requires SDL2_gfx which is an unofficial module so you need to build it yourself.

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