github.com/varialus/godfly@v0.0.0-20130904042352-1934f9f095ab/misc/cgo/testso/cgoso.go (about)

     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 freebsd LDFLAGS: -L. -l cgosotest
    12  #cgo openbsd LDFLAGS: -L. -l cgosotest
    13  #cgo netbsd LDFLAGS: -L. libcgosotest.so
    14  #cgo darwin LDFLAGS: -L. libcgosotest.dylib
    15  #cgo windows LDFLAGS: -L. libcgosotest.dll
    16  
    17  void init(void);
    18  void sofunc(void);
    19  */
    20  import "C"
    21  
    22  func Test() {
    23  	C.init()
    24  	C.sofunc()
    25  }
    26  
    27  //export goCallback
    28  func goCallback() {
    29  }