[Go] 在Go语言中嵌入C语言 →→→→→进入此内容的聊天室

来自 , 2020-12-14, 写在 Go, 查看 141 次.
URL http://www.code666.cn/view/f655e8f9
  1. package main
  2.  
  3. /*
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6.  
  7. void say_hello() {
  8.         printf("Hello World!\n");
  9. }
  10. */
  11. import "C"
  12.  
  13. func main() {
  14.         C.say_hello()
  15. }
  16.  
  17.  
  18.  

回复 "在Go语言中嵌入C语言"

这儿你可以回复上面这条便签

captcha