...
Run Format

Source file misc/cgo/testso/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.dll
    18	
    19	void init(void);
    20	void sofunc(void);
    21	*/
    22	import "C"
    23	
    24	func Test() {
    25		C.init()
    26		C.sofunc()
    27	}
    28	
    29	//export goCallback
    30	func goCallback() {
    31	}
    32	

View as plain text