-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Error when running code #572
Comments
Hi @vtf6259, could you show me how you build the code that generated the error? |
@veeableful it is |
Thanks @vtf6259! Would it compile if you remove usage of Oh and how did you install SDL2 and SDL2_ttf? Are you using MinGW? |
@veeableful to install SDL2 and SDL2_ttf i use |
Oh that wouldn't install SDL2 and SDL2_ttf. They are separate, required packages that go-sdl2 depends on. I'm not sure if the following will work on Windows 11 but perhaps you can try it. On Windows,
|
Go version: go1.20.6
Go-SDL2 version: 0.4.35
SDL2 version: N/A
OS: Windows 11
Architecture: x64
When i run my go-sdl2 code i get the error:"
github.com/veandco/go-sdl2/ttf: build constraints exclude all Go files in C:\Users\vtf62\go\pkg\mod\github.com\veandco\[email protected]\ttf
"
and my code is ```go
package main
import (
"fmt"
"os"
)
func run() error {
err := sdl.Init(sdl.INIT_EVERYTHING)
if err != nil {
return fmt.Errorf("failed to initialize SDL: %v", err)
}
defer sdl.Quit()
}
func main() {
err := run()
if err != nil {
fmt.Fprintf(os.Stderr, "%v", err)
os.Exit(1)
}
}
The text was updated successfully, but these errors were encountered: