mirror of
https://github.com/golang/go
synced 2024-11-22 16:25:07 -07:00
dc57ed8caf
The test.bash file generates .so file using gcc, builds the executable using the go tool and then run it with the $LD_LIBRARY_PATH variable pointing to the directory where the .so file lives. Fixes #2982. R=rsc, remyoudompheng CC=golang-dev https://golang.org/cl/5788043
20 lines
317 B
Go
20 lines
317 B
Go
// 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
|
|
|
|
/*
|
|
#cgo LDFLAGS: -L. -lcgosotest
|
|
void sofunc(void);
|
|
*/
|
|
import "C"
|
|
|
|
func Test() {
|
|
C.sofunc()
|
|
}
|
|
|
|
//export goCallback
|
|
func goCallback() {
|
|
}
|