go-opencl icon indicating copy to clipboard operation
go-opencl copied to clipboard

no proper C includes

Open notnot opened this issue 7 years ago • 2 comments

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"

...

notnot avatar May 07 '17 22:05 notnot

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.

ghost avatar Jun 30 '17 16:06 ghost

Since this project appears to be dead (@samuel?), I have forked to https://github.com/jgillich/go-opencl

jgillich avatar Jan 24 '18 15:01 jgillich