You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
package main
// int a(void) { return 5; };
import "C"
import "fmt"
func main() {
fmt.Println(C.a())
}
What did you expect to see?
5
What did you see instead?
# command-line-arguments
cgo-gcc-prolog:40:7: error: called object type 'struct (anonymous struct at cgo-gcc-prolog:33:2) *' is not a function or function pointer
Does this issue reproduce with the latest release (go1.9.2)?
yes
System details
go version devel +3aeb3950a9 Mon Dec 18 20:24:12 2017 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hiro/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hiro/.go"
GORACE=""
GOROOT="/Users/hiro/go"
GOTMPDIR=""
GOTOOLDIR="/Users/hiro/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wq/dwn8hs0x7njbzty9f68y61700000gn/T/go-build977751088=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version devel +3aeb3950a9 Mon Dec 18 20:24:12 2017 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +3aeb3950a9 Mon Dec 18 20:24:12 2017 +0000
uname -v: Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64
ProductName: Mac OS X
ProductVersion: 10.13.2
BuildVersion: 17C88
lldb --version: lldb-900.0.64
Swift-4.0
gdb --version: GNU gdb (GDB) 8.0.1
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
What did you see instead?
Does this issue reproduce with the latest release (go1.9.2)?
yes
System details
The text was updated successfully, but these errors were encountered: