-
Notifications
You must be signed in to change notification settings - Fork 68
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
Go-SDL/ttf incompatible with Go 1.0.1? #57
Comments
I think the problem is that those functions are missing from SDL_ttf.h, which is part of the C SDL library. Maybe it's a version issue. Maybe we're using a SDL 2.0 and this code is expecting some newer version of SDL. I worked around the issue by commenting out each of the lines in ttf.go that referred to an undeclared identifier. |
same here 👍 go get -u github.com/banthar/Go-SDL/ttf github.com/banthar/Go-SDL/ttf1: error: 'TTF_SetFontHinting' undeclared (first use in this function) |
Commenting out the *FontOutline and *FontHinting methods gets it going for me on Ubuntu Precise with libsdl-ttf-2.09: diff --git a/ttf/ttf.go b/ttf/ttf.go
index 3401543..d1a4a74 100644
--- a/ttf/ttf.go
+++ b/ttf/ttf.go
@@ -161,13 +161,13 @@ func (f *Font) GetStyle() int { return int(C.TTF_GetFontSt
// Sets the rendering style of the font.
func (f *Font) SetStyle(style int) { C.TTF_SetFontStyle(f.cfont, C.int(style))
-func (f *Font) GetOutline() int { return int(C.TTF_GetFontOutline(f.cfont)) }
+// func (f *Font) GetOutline() int { return int(C.TTF_GetFontOutline(f.cfont))
-func (f *Font) SetOutline(outline int) { C.TTF_SetFontOutline(f.cfont, C.int(ou
+// func (f *Font) SetOutline(outline int) { C.TTF_SetFontOutline(f.cfont, C.int
-func (f *Font) GetHinting() int { return int(C.TTF_GetFontHinting(f.cfont)) }
+// func (f *Font) GetHinting() int { return int(C.TTF_GetFontHinting(f.cfont))
-func (f *Font) SetHinting(hinting int) { C.TTF_SetFontHinting(f.cfont, C.int(hi
+// func (f *Font) SetHinting(hinting int) { C.TTF_SetFontHinting(f.cfont, C.int
// Returns the maximum height of all the glyphs of the font.
func (f *Font) Height() int { return int(C.TTF_FontHeight(f.cfont)) } |
Go-SDL/ttf does not build successfully on Go 1.0.1.
Making Go-SDL/ttf:
The text was updated successfully, but these errors were encountered: