Source file src/cmd/cgo/internal/testso/testdata/so/cgoso.go
1 // Copyright 2011 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 cgosotest 6 7 /* 8 // intentionally write the same LDFLAGS differently 9 // to test correct handling of LDFLAGS. 10 #cgo linux LDFLAGS: -L. -lcgosotest 11 #cgo dragonfly LDFLAGS: -L. -l cgosotest 12 #cgo freebsd LDFLAGS: -L. -l cgosotest 13 #cgo openbsd LDFLAGS: -L. -l cgosotest 14 #cgo solaris LDFLAGS: -L. -lcgosotest 15 #cgo netbsd LDFLAGS: -L. libcgosotest.so 16 #cgo darwin LDFLAGS: -L. libcgosotest.dylib 17 #cgo windows LDFLAGS: -L. libcgosotest.a 18 #cgo aix LDFLAGS: -L. -l cgosotest 19 20 void init(void); 21 void sofunc(void); 22 */ 23 import "C" 24 25 func Test() { 26 C.init() 27 C.sofunc() 28 } 29 30 //export goCallback 31 func goCallback() { 32 } 33