Exemple #1
0
// Test function for elevator
func Test_Run() {
	err := C.run()
	if err != 0 {
		fmt.Println("Test program terminated abnormally")
	}
	fmt.Println("Test program terminated normally")
}
// Test function for elevator
func Test_Run() {
	fmt.Println("Attempting to run elevator")
	err := C.run()
	if err != 0 {
		fmt.Println("Test program terminated abnormally")
	}
	fmt.Println("Test program terminated normally")
}
Exemple #3
0
Fichier : main.go Projet : reusee/p
func main() {
	var cArgs []*C.char
	for _, arg := range os.Args {
		cArgs = append(cArgs, C.CString(arg))
	}
	runtime.LockOSThread()
	_, f, _, _ := runtime.Caller(0)
	C.run(C.int(len(os.Args)), &cArgs[0], C.CString(filepath.Join(filepath.Dir(f), "main.qml")))
}
Exemple #4
0
func main() {
	if len(os.Args) != 2 {
		fmt.Printf("%v\n", printHelp())
		os.Exit(1)
	}

	path, err := filepath.Abs(os.Args[1])
	if err != nil {
		fmt.Printf("%v\n", printHelp())
		os.Exit(1)
	}

	url := C.CString(fmt.Sprintf("file://%s", path))
	defer C.free(unsafe.Pointer(url))
	C.run(url)

	os.Exit(0)
}
Exemple #5
0
func main() {
	C.run()
}
Exemple #6
0
func main() {
	C.run()

	//fmt.Printf("hi")

}
Exemple #7
0
func main() {
	if v := C.run(); v != 2 {
		panic(v)
	}
}