Created
September 19, 2014 12:44
-
-
Save obscuren/3a309953ca513cd5b1aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C CODE | |
#include "_cgo_export.h" | |
void ACFunction() { | |
printf("ACFunction()\n"); | |
AGoFunction(); | |
} | |
// GO Code | |
package gocallback | |
import "fmt" | |
/* | |
#include <stdio.h> | |
extern void ACFunction(); | |
*/ | |
import "C" | |
//export AGoFunction | |
func AGoFunction() { | |
fmt.Println("AGoFunction()") | |
} | |
func Example() { | |
C.ACFunction() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment