demo: don't use symlinks for x/tools compatible

This commit is contained in:
Li Jie
2024-12-31 19:54:30 +08:00
parent 03b469212e
commit c602038597
14 changed files with 254 additions and 6 deletions

16
_demo/cgofull/bar.go Normal file
View File

@@ -0,0 +1,16 @@
package main
/*
#cgo CFLAGS: -DBAR
#include <stdio.h>
#include "foo.h"
static void foo(Foo* f) {
printf("foo in bar: %d\n", f->a);
}
*/
import "C"
func Bar(f *C.Foo) {
C.print_foo(f)
C.foo(f)
}