2011-11-22 07:57:49 -07:00
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package cgosotest
|
|
|
|
|
2012-03-08 10:13:41 -07:00
|
|
|
/*
|
2013-05-21 10:32:03 -06:00
|
|
|
// intentionally write the same LDFLAGS differently
|
|
|
|
// to test correct handling of LDFLAGS.
|
|
|
|
#cgo linux LDFLAGS: -L. -lcgosotest
|
2013-09-04 16:19:21 -06:00
|
|
|
#cgo dragonfly LDFLAGS: -L. -l cgosotest
|
2013-05-21 10:32:03 -06:00
|
|
|
#cgo freebsd LDFLAGS: -L. -l cgosotest
|
|
|
|
#cgo openbsd LDFLAGS: -L. -l cgosotest
|
|
|
|
#cgo netbsd LDFLAGS: -L. libcgosotest.so
|
|
|
|
#cgo darwin LDFLAGS: -L. libcgosotest.dylib
|
|
|
|
#cgo windows LDFLAGS: -L. libcgosotest.dll
|
|
|
|
|
2013-04-22 14:42:04 -06:00
|
|
|
void init(void);
|
2012-03-08 10:13:41 -07:00
|
|
|
void sofunc(void);
|
|
|
|
*/
|
2011-11-22 07:57:49 -07:00
|
|
|
import "C"
|
|
|
|
|
|
|
|
func Test() {
|
2013-04-22 14:42:04 -06:00
|
|
|
C.init()
|
2011-11-22 07:57:49 -07:00
|
|
|
C.sofunc()
|
|
|
|
}
|
|
|
|
|
|
|
|
//export goCallback
|
|
|
|
func goCallback() {
|
|
|
|
}
|