import "C"func f() { var vGo int var vC C.int // fails to compile with error // cannot use &vGo (type *int) as type *C.int in argument to... C.c_function(&vGo) // compiles just fine: C.c_function(&vC)}我用 CGO_ENABLED=1 GOARCH=arm 編譯...在這種情況下 int 和 C.int 類型有什么不同?在哪里可以找到有關 GO 中 C 類型的其他信息?
- 2 回答
- 0 關注
- 424 瀏覽
添加回答
舉報
0/150
提交
取消