github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/link/internal/ld/testdata/issue32233/lib/lib.go (about) 1 // Copyright 2019 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package lib 6 7 /* 8 #cgo darwin CFLAGS: -D__MAC_OS_X_VERSION_MAX_ALLOWED=101450 9 #cgo darwin LDFLAGS: -framework Foundation -framework AppKit 10 #include "stdlib.h" 11 int function(void); 12 */ 13 import "C" 14 import "fmt" 15 16 func DoC() { 17 C.function() 18 fmt.Println("called c function") 19 }