imagio icon indicating copy to clipboard operation
imagio copied to clipboard

Trouble with shared library of libopencv v2.3.1-7

Open sigmonsays opened this issue 11 years ago • 2 comments

What version of go and libopencv should I be using?

Thanks!

 $ go install .
# github.com/3d0c/imagio/imgproc
./do.go:68: cannot use (*C.Blob)(unsafe.Pointer(blobptr(o.Base))) (type *C.Blob) as type *C.struct___0 in argument to _Cfunc_resizer
./do.go:69: cannot use (*C.PixelDim)(unsafe.Pointer(zoom)) (type *C.PixelDim) as type *C.struct___1 in argument to _Cfunc_resizer
./do.go:71: cannot use (*C.CvRect)(initCvRect(roi)) (type *C.CvRect) as type *C.struct_CvRect in argument to _Cfunc_resizer
./do.go:104: cannot use (*C.Blob)(blobptr(base)) (type *C.Blob) as type *C.struct___0 in argument to _Cfunc_blender
./do.go:105: cannot use (*C.Blob)(blobptr(o.Foreground)) (type *C.Blob) as type *C.struct___0 in argument to _Cfunc_blender
./do.go:106: cannot use (*C.Blob)(blobptr(o.Mask)) (type *C.Blob) as type *C.struct___0 in argument to _Cfunc_blender
./do.go:108: cannot use (*C.CvRect)(rect) (type *C.CvRect) as type *C.struct_CvRect in argument to _Cfunc_blender

sigmonsays avatar Sep 23 '14 01:09 sigmonsays

I want to add the build works fine with go1.1.2 but breaks with go1.3. I suspect its related to how cgo handles pointers to incomplete types. See https://golang.org/doc/go1.3#cgo for more details. I'll try to figure out the fix if I find the time.

sigmonsays avatar Sep 23 '14 03:09 sigmonsays

Fixed by a82dea416d15ba237c59107a65ad973a6cac3da9

3d0c avatar Sep 30 '14 10:09 3d0c