blob: 422adea93d07daaeff6acee5e16eea72505bc54f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# Issue #7573
# cmd/cgo: undefined reference when linking a C-library using gccgo
[!cgo] skip
[!gccgo] skip
go build -r -compiler gccgo cgoref
stderr 'gccgo.*\-L [^ ]*alibpath \-lalib' # make sure that Go-inline "#cgo LDFLAGS:" ("-L alibpath -lalib") passed to gccgo linking stage
-- cgoref/cgoref.go --
package main
// #cgo LDFLAGS: -L alibpath -lalib
// void f(void) {}
import "C"
func main() { C.f() }
|