// 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") }
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"))) }
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) }
func main() { C.run() }
func main() { C.run() //fmt.Printf("hi") }
func main() { if v := C.run(); v != 2 { panic(v) } }