1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 12:32:21 +00:00
2018-08-04 07:03:14 +08:00

4 lines
637 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 第2章 CGO编程
C/C++经过几十年的发展已经积累了庞大的软件资产它们很多久经考验而且性能已经足够优化。Go语言必须能够站在C/C++这个巨人的肩膀之上有了海量的C/C++软件资产兜底之后我们才可以放心愉快地用Go语言编程。C语言作为一个通用语言很多库会选择提供一个C兼容的API然后用其他不同的编程语言实现。Go语言通过自带的一个叫CGO的工具来支持C语言函数调用同时我们可以用Go语言导出C动态库接口给其它语言使用。本章主要讨论CGO编程中涉及的一些问题。