Skip to content

Instantly share code, notes, and snippets.

@kylelemons
Created July 14, 2010 02:13
Show Gist options
  • Save kylelemons/474907 to your computer and use it in GitHub Desktop.
Save kylelemons/474907 to your computer and use it in GitHub Desktop.
==> ./sub/ctpkg.c <==
#include <stdio.h>
void PrintIt() {
printf("PASS\n");
}
==> ./sub/cgotpkg.go <==
package tpkg
// #include "ctpkg.h"
import "C"
func TestIt() {
C.PrintIt()
}
==> ./cgosub.go <==
package main
import (
"sub/tpkg"
)
func main() {
tpkg.TestIt()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment