go-opencl
go-opencl copied to clipboard
no proper C includes
On a linux machine i see this:
jpad@guru:~$ go get github.com/samuel/go-opencl/cl
github.com/samuel/go-opencl/cl
prog/go/extern/src/github.com/samuel/go-opencl/cl/cl.go:19:17: fatal error: cl.h: No such file or directory // #include "cl.h" ^ compilation terminated.
I guess that on an OS X machine there will also be similar troubles. I think something like this would be a solution:
/* #cgo CFLAGS: -I CL #cgo !darwin LDFLAGS: -lOpenCL #cgo darwin LDFLAGS: -framework OpenCL #ifdef APPLE #include "OpenCL/opencl.h" #else #include "CL/opencl.h" #endif */ import "C"
...
Confirmed; the above replacement for // #include "cl.h"
works for me. Thanks!
Should this be made into a PR? Happy to do so, but @notnot you may be the more appropriate person to do so.
Since this project appears to be dead (@samuel?), I have forked to https://github.com/jgillich/go-opencl