You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I compile a program with "github.com/veandco/go-sdl2/sdl "then everything is ok. The program is compiled.
If I insert "github.com/veandco/go-sdl2/ttf " then I get an error
C:\GoPrg\sdl2_start>go build main.go # github.com/veandco/go-sdl2/ttf In file included from C:\Users\Keyn\go\pkg\mod\github.com\veandco\[email protected]\ttf\sdl_ttf.go:6: ./sdl_ttf_wrapper.h:2:18: fatal error: SDL2/SDL_ttf.h: No such file or directory 2 | #include <SDL2/SDL_ttf.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
the file exists C:\Users\Keyn\go\pkg\mod\github.com\veandco\[email protected]\include\SDL2\SDL_ttf.h
How to solve the problem?
The text was updated successfully, but these errors were encountered:
Hi @Keyn1, I think that is because SDL2_ttf is not installed in the Windows environment. You can download the runtime library here and the header file from the source code here. They can be put in the same location as the SDL2 that you have installed.
Alternatively, you could try running the static compilation build that has been tested to work in Linux. It would use our included, pre-compiled SDL2 libraries using go build -tags static -ldflags="-s -w" on Windows. I tested running it using Git Bash and it seems to work.
If I compile a program with "github.com/veandco/go-sdl2/sdl "then everything is ok. The program is compiled.
If I insert "github.com/veandco/go-sdl2/ttf " then I get an error
C:\GoPrg\sdl2_start>go build main.go # github.com/veandco/go-sdl2/ttf In file included from C:\Users\Keyn\go\pkg\mod\github.com\veandco\[email protected]\ttf\sdl_ttf.go:6: ./sdl_ttf_wrapper.h:2:18: fatal error: SDL2/SDL_ttf.h: No such file or directory 2 | #include <SDL2/SDL_ttf.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
the file exists C:\Users\Keyn\go\pkg\mod\github.com\veandco\[email protected]\include\SDL2\SDL_ttf.h
How to solve the problem?
The text was updated successfully, but these errors were encountered: