We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
throw an exception of
could not determine kind of name for C.memcpy
here is the source code to reproduce the bug
package main /* #include <string.h> #include <stdlib.h> */ import "C" import ( "fmt" "unsafe" ) func main() { record := (**C.uchar)(unsafe.Pointer(uintptr(0))) // var record **C.uchar buf := []byte{1, 2, 3} fmt.Println(buf) size := C.int(len(buf)) *record = (*C.uchar)(C.malloc(C.size_t(len(buf)))) fmt.Println(*record) C.memcpy(unsafe.Pointer(*record), unsafe.Pointer(&buf[0]), C.size_t(len(buf))) }
go version go1.8.3 darwin/amd64 macos Sierra 10.12 (16A323)
The text was updated successfully, but these errors were encountered:
Remove the blank line between your import "C" and the comment preceding it.
import "C"
See https://golang.org/pkg/cmd/cgo/
Sorry, something went wrong.
No branches or pull requests
throw an exception of
here is the source code to reproduce the bug
The text was updated successfully, but these errors were encountered: