I am new to Go and trying to learn how to call C from Go. I wrote this program to open a semaphore by name, get the value and print it on the screen. When I run it go build semvalue.go , I get the error: ./semvalue.go:16:14: unexpected type: ...
What does it mean? What am I doing wrong?
package main import "fmt" // #cgo LDFLAGS: -pthread // #include <stdlib.h> // #include <fcntl.h> // #include <sys/stat.h> //
Thanks.
source share