Dmitriy Vyukov | 11e73b8 | 2011-11-22 17:57:49 +0300 | [diff] [blame] | 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 | |
Francisco Souza | dc57ed8 | 2012-03-08 12:13:41 -0500 | [diff] [blame] | 7 | /* |
Shenghou Ma | bea7b51 | 2013-05-22 00:32:03 +0800 | [diff] [blame] | 8 | // intentionally write the same LDFLAGS differently |
| 9 | // to test correct handling of LDFLAGS. |
| 10 | #cgo linux LDFLAGS: -L. -lcgosotest |
Aulus Egnatius Varialus | 2b44b36 | 2013-09-04 15:19:21 -0700 | [diff] [blame] | 11 | #cgo dragonfly LDFLAGS: -L. -l cgosotest |
Shenghou Ma | bea7b51 | 2013-05-22 00:32:03 +0800 | [diff] [blame] | 12 | #cgo freebsd LDFLAGS: -L. -l cgosotest |
| 13 | #cgo openbsd LDFLAGS: -L. -l cgosotest |
Aram Hăvărneanu | 2230e9d | 2015-03-30 23:11:36 +0200 | [diff] [blame] | 14 | #cgo solaris LDFLAGS: -L. -lcgosotest |
Shenghou Ma | bea7b51 | 2013-05-22 00:32:03 +0800 | [diff] [blame] | 15 | #cgo netbsd LDFLAGS: -L. libcgosotest.so |
| 16 | #cgo darwin LDFLAGS: -L. libcgosotest.dylib |
| 17 | #cgo windows LDFLAGS: -L. libcgosotest.dll |
| 18 | |
Shenghou Ma | 8c72b81 | 2013-04-23 04:42:04 +0800 | [diff] [blame] | 19 | void init(void); |
Francisco Souza | dc57ed8 | 2012-03-08 12:13:41 -0500 | [diff] [blame] | 20 | void sofunc(void); |
| 21 | */ |
Dmitriy Vyukov | 11e73b8 | 2011-11-22 17:57:49 +0300 | [diff] [blame] | 22 | import "C" |
| 23 | |
| 24 | func Test() { |
Shenghou Ma | 8c72b81 | 2013-04-23 04:42:04 +0800 | [diff] [blame] | 25 | C.init() |
Dmitriy Vyukov | 11e73b8 | 2011-11-22 17:57:49 +0300 | [diff] [blame] | 26 | C.sofunc() |
Dmitriy Vyukov | 11e73b8 | 2011-11-22 17:57:49 +0300 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | //export goCallback |
| 30 | func goCallback() { |
| 31 | } |