github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/cmd/link/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 }