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
Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem. Thanks.
What steps will reproduce the problem?
With libsdl headers available, try to compile the following source code
using a regular cgo Makefile:
package main
/*
#include <SDL.h>
*/
import "C"
func BlitTest(a, b *C.SDL_Surface) {
C.SDL_BlitSurface(a, nil, b, nil)
}
What is the expected output? What do you see instead?
Instead of compiling, I get:
$ make
CGOPKGPATH= /home/rsaarelm/bin/cgo -I/usr/include/SDL -D_GNU_SOURCE=1
-D_REENTRANT sdl.go
/home/rsaarelm/bin/8g -o _go_.8 sdl.cgo1.go _cgo_gotypes.go
_cgo_gotypes.go:81: undefined: SDL_UpperBlit
make: *** [_go_.8] Error 1
What is your $GOOS? $GOARCH?
linux 386
Which revision are you using? (hg identify)
f467eb7716c4 tip
Please provide any additional information below.
From include/SDL/SDL_video.h:
#define SDL_BlitSurface SDL_UpperBlit
The text was updated successfully, but these errors were encountered:
Just to clarify, this is something that used to work with the previous cgo.
There's a similar problem with constants that are #defined to be aliased to other
#define constants, as in
#define foo 1
#define bar foo
I'm sure this is due to the changes I made to support `referencing' #defined
constants, though I'm not entirely sure why it happens yet. If I can't come up with a
solution, a reasonable compromise would be to only allow this for things we can
determine to be numeric or string constants.
The text was updated successfully, but these errors were encountered: