C 語言資源大全中文版

C 語言資源大全中文版 

我想很多程序員應該記得 GitHub 上有一個 Awesome:XXX 系列的資源整理。[awesome-c](https://notabug.org/koz.ross/awesome-c) 是 koz.ross 發起維護的 C 語言資源列表,內容包括了:構建系統、編譯器、數據庫、加密、初中高的教程/指南、書籍、庫等等。

 

Awesome 系列雖然挺全,但基本只對收錄的資源做了極爲簡要的介紹,如果有更詳細的中文介紹,對相應開發者的幫助會更大。這也是我們發起這個開源項目的初衷。

 

* * *

 

### 我們要做什麼?

 

- 基於 awesome-c 列表,我們將對其中的各個資源項進行編譯整理。此外還將從其他來源補充好資源。

- 整理後的內容,將收錄在[伯樂在線資源頻道](http://hao.jobbole.com/)。可參考已整理的內容:

  - 《[libPhenom:Facebook開源的高性能C語言併發編程框架](http://hao.jobbole.com/libphenom/)》

 

* * *

 

### 如何參與本項目?

 

<!-- 從下面的目錄來看,本項目的工作量小不了,所以非常期待能有更多程序員一起來參與。

 

不過加入前,有幾個小要求:

 

* 英文還不錯,能讀懂英文並用自己的話複述;

* 在用 C 語言;

 

如有興趣,請加 QQ:50872495。加 Q 時請註明「C語言大全」。// 這不是 QQ 羣。 -->

 

* * *

 

### 如何爲列表貢獻新資源?

 

歡迎大家爲列表貢獻高質量的新資源,提交PR時請參照以下要求:

 

* 請確保推薦的資源自己使用過

* 提交PR時請註明推薦理由

 

資源列表管理收到PR請求後,會定期(每週)在微博轉發本週提交的PR列表,並在微博上面聽取使用過這些資源的意見。確認通過後,會加入資源大全。

 

感謝您的貢獻!

 

* * *

 

### 本項目的參與者

 

- 維護者:

- 貢獻者:[Yonah瀟](http://www.jobbole.com/members/Yonah/)、[骷髏](http://www.jobbole.com/members/lighter_cd/)、[賀賀](http://www.jobbole.com/members/jianghehe/)、[beyondwu](http://www.jobbole.com/members/beyondwu/)、[Huang Lin](https://github.com/MiterV1)、[Anloper](https://github.com/Anloper)、[冰斌](http://www.jobbole.com/members/libing1209/)

 

注:名單不分排名,不定期補充更新

 

* * *

 

<!-- ### 獎勵計劃

 

雖然獎勵可能並不是你加入的主要原因,但還是有必要提一下:

 

* 整理超過 20 個資源後,可在伯樂在線上開通打賞;

* 每整理 20 個資源,有機會獲得技術書籍或各種有意思的創意、極客產品;

* [獎勵詳情](http://hao.jobbole.com/rewards/)

 

* * * -->

 

## 目錄

*   [構建系統](#build-systems)

*   [編譯器](#compilers)

*   [加密](#crypto)

*   [數據庫](#database)

*   [文檔生成](#documentation-generation)

*   [編輯器](#editors)

*   [環境](#environments)

*   [框架](#frameworks)

*   [遊戲編程](#game-programming)

    *   [引擎](#engines)

    *   [資源](#resources)

*   [通用編程](#generic-programming)

*   [圖形](#graphics)

*   [GUI](#gui)

*   [JSON](#json)

*   [學習、參考和指南](#learning-reference-and-tutorials)

    *   [在線資源](#online)

        *   [參考](#reference)

        *   [初級](#beginner)

        *   [中級](#intermediate)

        *   [高級](#advanced)

        *   [自學資源](#self-study-courses)

    *   [實體書](#physical)

        *   [參考](#reference-1)

        *   [初級](#beginner-1)

        *   [中級](#intermediate-1)

        *   [高級](#advanced-1)

*   [多媒體](#multimedia)

*   [網絡編程](#networking-and-internet)

    *   [Web 框架](#web-frameworks)

*   [數值計算](#numerical)

*   [並行編程](#parallel-programming)

*   [正則表達式](#regex)

*   [序列化](#serialization)

*   [源碼集錦](#source-code-collections)

*   [標準庫](#standard-libraries)

*   [字符串處理](#string-manipulation)

*   [測試工具](#testing)

*   [文本編輯器擴展](#text-editor-extensions)

    *   [Emacs](#emacs)

    *   [Vim](#vim)

*   [工具](#tools)

*   [其他工具](#utilities)

*   [XML](#xml)

*   [其他資源](#resources-2)

    *   [有影響力的書](#influential-books)

    *   [知名網站/博客](#websites-blogs)

    *   [微信公衆號](#weibo-weixin)

 

<h2 id="build-systems">構建系統</h2>

 

下面是一些 C 項目的自動化構建和測試工具。

 

*   aimake:一個被設計來避免複雜配置的構建工具。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](http://nethack4.org/projects/aimake/)

*   Autoconf:一個可擴展的 M4 宏指令包,提供命令行腳本來自動配置軟件源碼包,是 Autotools 的一部分。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://www.gnu.org/software/autoconf/)

*   Automake:一個自動生成符合 GNU 代碼標準的 Makefile.in 文件的工具。需要與 Autoconf 配合使用,它也是 Autotools 的一部分。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://www.gnu.org/software/automake/automake.html)

*   Jam:一個構建系統,它被設計的比make更加易用。隱式地理解 C 的構建規則。[Jam License](https://en.wikipedia.org/wiki/Perforce_Jam#License)。[官網](https://www.perforce.com/resources/documentation/jam)

*   Libtool:一個通用庫支持腳本,是 Autotools 的一部分。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://gnu.org/software/libtool/)

*   Meson:一個非常快,用戶友好的構建系統,基於 Ninja。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](http://mesonbuild.com/)

 

<h2 id="compilers">編譯器</h2>

 

*   Clang:一個基於 LLVM 的 C 的編譯器,支持 C11 標準。[NCSA](http://directory.fsf.org/wiki/License:IllinoisNCSA)。[官網](http://clang.llvm.org/)

*   CompCert:一個經過充分驗證的 C 編譯器。支持幾乎所有的 C89 標準。[GNU GPL2.1](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://github.com/AbsInt/CompCert)

*   GCC:在它的編譯器集合中提供了 C 編譯器。支持 C11 和 OpenMP 的標準。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://gcc.gnu.org/)

*   PCC:一個值得尊敬的 C 編譯器,支持 C99 標準。[Various licenses](http://pcc.ludd.ltu.se/licenses/),完全免費。[官網](http://pcc.ludd.ltu.se/)

*   TCC:一個迷你,速度快的 C 編譯器,支持 C99(除了複雜的類型)。 [LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](http://bellard.org/tcc/)

 

<h2 id="crypto">加密</h2>

 

*   GnuTLS:一個安全通信庫,實現了 SSL,TLS 和 DTLS。[GNU GPL2.1](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](http://www.gnutls.org/)

*   libgcrypt:一個通用的密碼庫,支持多種加密方法。 [GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) (代碼),[GNU GPL2.1](http://www.gnu.org/licenses/gpl.html) 或更高版本(說明書和工具)。[官網](https://www.gnu.org/software/libgcrypt/)

*   OpenSSL:一個 SSL 和 TLS 協議的實現,還包括一個加密庫。[Dual Licensed under the OpenSSL License and the SSLeay License](https://www.openssl.org/source/license.html)。[官網](https://www.openssl.org/)

*   libsodium:一個現代,易用的加密庫。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/jedisct1/libsodium)

*   libtomcrypt:一個相當全面,模塊化和可移植的工具集。公開領域。[官網](https://github.com/libtom/libtomcrypt)

*   mbed TLS:一個 C 實現的加密庫。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](https://tls.mbed.org/)

 

<h2 id="database">數據庫</h2>

 

下面列出了基於 C API 的數據庫和數據存儲

 

*   BerkeleyDB:一個高性能的嵌入式鍵值對數據庫。[GNU AGPLv3](https://gnu.org/licenses/agpl.html)。[官網](http://www.oracle.com/us/products/database/berkeley-db/overview/index.html)

*   Hiredis:一個極簡的 Redis 客戶端。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](https://github.com/redis/hiredis)

*   LMDB:一個極快,極簡的嵌入式鍵值對數據存儲系統。[newOpenLDAP](http://directory.fsf.org/wiki/License:OpenLDAPv2.7)。[官網](http://symas.com/mdb/)

*   MariaDB:一個強壯,可擴展和可靠的 SQL 服務器,設計來作爲 MySQL 的替代品。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](https://mariadb.com/)

*   mongo-c-driver:一個高性能的 MongoDB 客戶端。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0).[官網](https://github.com/mongodb/mongo-c-driver)

*   PostgreSQL:一個強大的對象關係數據庫系統。[PostgreSQL licence](http://opensource.org/licenses/postgresql)。[官網](http://www.postgresql.org/)

*   recutils:一個工具和 C 庫的集合,用於訪問可編輯,純文本的名爲 recfiles 的數據庫文件。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://www.gnu.org/software/recutils/)

*   Redis:一個先進的鍵值對存儲系統。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](http://redis.io/)

*   sophia:一個現代,可嵌入的鍵值對數據庫。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://github.com/pmwkaa/sophia)

*   SQLite:一個自包含,無服務器,零配置,支持事務的 SQL 數據庫引擎,包括 C 接口。公開領域。[官網](http://www.sqlite.org/)

*   UnQLite:一個自包含,無服務器,零配置,支持事務的 NoSQL 數據庫引擎,包括 C 接口。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](http://unqlite.org/)

 

<h2 id="documentation-generation">文檔生成</h2>

 

*   Cxref:生成 C 程序的文檔,支持 LaTeX,HTML, RTF 或者 SGML 的格式。[GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)[官網](http://www.gedanken.org.uk/software/cxref/)

*   DocOnce:一種樸素的標籤標記語言,可以用來生成多種格式的文檔。[BSD-3clause](http://directory.fsf.org/wiki/License:BSD_3Clause).[官網](https://hplgit.github.io/doconce/doc/web/index.html)

*   Doxygen:一個事實上的標準工具,用於從註釋的代碼中生成 C 文檔。能夠生成多種格式的文檔。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](http://www.stack.nl/~dimitri/doxygen/index.html)

*   GTK-Doc:一個從註釋的代碼中生成 C 文檔的工具,支持 Autotools [GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)(代碼), [GNU FDL1.1](https://www.gnu.org/licenses/old-licenses/fdl-1.1.html)。[官網](http://www.gtk.org/gtk-doc/)

 

<h2 id="editors">編輯器</h2>

 

這些是特別精緻,IDE 類型的編輯器。如果你想要一個程序員的文本編輯器,看別的地方。此外,不管你選擇哪一款編輯器,它都支持 C。

 

*   Anjuta DevStudio:GNOME IDE。 [GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](http://anjuta.org/)

*   Code::Blocks:一個可擴展,可配置的 IDE,支持 C。[GNU GPL3](http://www.gnu.org/licenses/gpl.html)。[官網](http://www.codeblocks.org/)

*   CodeLite:一個跨平臺的 IDE。 [GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](http://www.codelite.org/)

*   Eclipse:一個用 Java 寫成的 IDE。 [EPL](http://directory.fsf.org/wiki/License:EPLv1.0)。[官網](http://www.eclipse.org/ide/)

*   Geany:一個很小很快的 IDE。 [GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)及更高版本。[官網](http://www.geany.org/)

*   KDevelop:KDE IDE. [GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](https://www.kdevelop.org/)

 

<h2 id="environments">環境</h2>

 

下面列出了被設計來引領 Windows 進入支持 C 的 21 世紀的技術。

 

*   Cygwin:被設計用於在 Windows 下模擬 POSIX 兼容環境。[Various licenses, all free](https://cygwin.com/licensing.html)。[官網](https://cygwin.com/)

*   MinGW-w64:一個 Windows 下極簡的 C 開發環境,支持 64 位。[Various licenses, all free](http://mingw.org/license)。[官網](http://mingw-w64.yaxm.org/doku.php/start)

 

<h2 id="frameworks">框架</h2>

 

這一節包括提供數據結構的大型庫和你所期待“現代”的標準庫。

 

*   APR:Apache Portable Runtime;另一個跨平臺的實用函數庫。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](http://apr.apache.org/)

*   C Algorithms:一個常用算法和數據結構的集合。[官網](https://github.com/fragglet/c-algorithms)

*   CPL:The Common Pipeline Library;一系列詳盡,高效和強壯的軟件工具包。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](http://www.eso.org/sci/software/cpl/)

*   EFL:一個大型實用數據結構和函數的的集合。多種許可證,完全免費。[官網](https://www.enlightenment.org/p.php?p=about/efl)

*   GLib:一個便攜,高效和強大的實用函數和數據結構庫。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](https://wiki.gnome.org/Projects/GLib)

*   GIO:一個現代和易用的 VFS API。[GNU LGPL2.1]。[官網](https://developer.gnome.org/gio/)

*   GObject:一個 C 的面向對象系統和對象模型。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](https://developer.gnome.org/gobject/stable/)

*   libnih:一個輕量級的 C 函數和數據結構庫。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](https://github.com/keybuk/libnih)

*   libU:一個提供基本實用函數的迷你庫,包括內存分配,字符串處理和日誌功能。[官網](http://www.koanlogic.com/libu/)

*   PBL:一個包括實用函數,特色數據結構等的大型庫。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)及更高版本(庫),[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)及更高版本(測試代碼)。[官網](http://www.mission-base.com/peter/source/)

*   qlibc:一個簡單且強大的 C 庫,當我們想要小且輕的庫時,可作爲 Glib 的替代品。[qLib license](https://github.com/wolkykim/qlibc/blob/master/LICENSE) (類似於 [FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD"))。[官網](https://github.com/wolkykim/qlibc)

*   stb:一系列單文件 C 庫。公共領域。[官網](https://github.com/nothings/stb)

*   [libcstl](http://hao.jobbole.com/libcstl/):標準C語言通用數據結構和常用算法庫。[官網](http://libcstl.org/)

 

<h2 id="game-programming">遊戲編程</h2>

 

<h3 id="engines">引擎</h3>

 

這些作爲 C 遊戲編程代碼的例子。

 

*   [Corange](http://hao.jobbole.com/corange/):一個純 C 的遊戲引擎。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://github.com/orangeduck/Corange)

*   Darkplaces:一個 Quake2 引擎的修改版本。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](https://icculus.org/twilight/darkplaces/)

*   ioquake3:Quake3 引擎,終於免費啦。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](https://github.com/ioquake/ioq3)

*   Orx:一個便攜,輕量級,插件化,數據驅動,面向 2D 的遊戲引擎。[zlib](http://directory.fsf.org/wiki/License:Zlib)。[官網](https://bitbucket.org/orx/orx)

*   [Quake2](http://hao.jobbole.com/quake2/):Quake2 引擎。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](https://github.com/id-Software/Quake-2)

*   Spearmint:一個爲 FPS 遊戲設計的引擎。[GNU GPL3](http://www.gnu.org/licenses/gpl.html)及更高版本。[官網](https://github.com/zturtleman/spearmint)

 

<h3 id="resources">資源</h3>

 

這些是篩選過的,對遊戲編程有用的庫。

 

*   Allegro:一個跨平臺,視頻遊戲開發和多媒體庫。[zlib](http://directory.fsf.org/wiki/License:Zlib)。[官網](http://liballeg.org)

*   Chipmunk2D:一個快且輕量級的 2D 遊戲物理庫。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/slembcke/Chipmunk2D)

*   CSFML:一個用 C 封裝的 [SFML](http://www.sfml-dev.org/index.php)。[zlib](http://directory.fsf.org/wiki/License:Zlib)。[官網](http://www.sfml-dev.org/download/csfml/)

*   FreeGLUT:一個替代性的 OpenGL 實用工具包。允許用 OpenGL 上下文創建和管理窗口。[X11](http://directory.fsf.org/wiki/License:X11)。[官網](https://github.com/dcnieho/FreeGLUT)

*   GLFW:一個使用 OpenGL 上下文創建窗口的多平臺庫。[zlib](http://directory.fsf.org/wiki/License:Zlib)。[官網](http://www.glfw.org/)

*   libao:一個有多種輸出的跨平臺音頻庫。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)及更高版本。[官網](https://github.com/timonwong/libao)

*   RetroArch:[libretro](http://www.libretro.com/) 的參考前端。[GNU GPL3](http://www.gnu.org/licenses/gpl.html)。[官網](https://github.com/libretro/RetroArch)

*   SDL:一個跨平臺庫,通過 OpenGL 提供音頻,鍵盤,鼠標,操縱桿和圖形硬件的底層訪問。[zlib](http://directory.fsf.org/wiki/License:Zlib)。[官網](https://www.libsdl.org/)

*   SDL2:一個跨平臺庫,通過 OpenGL 提供音頻,鍵盤,鼠標,操縱桿和圖形硬件的底層訪問。這是最新版本。[zlib](http://directory.fsf.org/wiki/License:Zlib)。[官網](https://www.libsdl.org/)

 

<h2 id="generic-programming">通用編程</h2>

 

*   klib:小且輕量級的常用算法和數據結構實現。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/attractivechaos/klib)

 

<h2 id="graphics">圖形</h2>

 

*   Cairo:一個 2D 圖像庫。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) 或者 [MPLv1.1](https://directory.fsf.org/wiki/License:MPLv1.1)。[官網](http://cairographics.org/)

*   Cogl:一個 GPU 圖像和實用 API。[Expat](http://directory.fsf.org/wiki/License:Expat)(依賴使用 [3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause) 許可,庫使用 [LGPLv2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) 許可)。[官網](https://github.com/rib/cogl-web/wiki)

*   Clutter:一個基於 OpenGL 的 UI 庫。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](https://blogs.gnome.org/clutter/get-it/)

*   heman:一個迷你圖像實用工具庫,處理高度圖,法線圖,距離場等。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/prideout/heman)

*   libcaca:一個基於終端接口的 ASCII 渲染器。[WTFPLv2](http://www.wtfpl.net/txt/copying/)。[官網](https://github.com/cacalabs/libcaca)

*   libimagequant:小且輕量級的庫,用於高質量的從 RGBA 圖像到 8 位像素圖的轉換。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://pngquant.org/lib/)

*   libjpeg-turbo:一個更快的讀寫 JPEG 文件庫。[Various licences](http://www.libjpeg-turbo.org/About/License)。[官網](http://libjpeg-turbo.virtualgl.org/)

*   libpng:官方 PNG 參考庫。[libpng license](http://www.libpng.org/pub/png/src/libpng-LICENSE.txt)。[官網](https://http://www.libpng.org/)

*   libxmi:一個光柵化 2D 位圖的函數庫。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://gnu.org/software/libxmi/)

*   mozjpeg:一個提升 JPEG 圖像質量的編碼器。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](https://github.com/mozilla/mozjpeg)

*   OpenGL:一個高性能圖像的工業標準,提供了原生 C語言 綁定。[Various licenses](http://www.sgi.com/tech/opengl/?/license.html)。[官網](https://www.opengl.org/)

*   [Craft](http://hao.jobbole.com/craft/):一個利用OpenGL使用C編寫的簡單MineCraft的克隆。[官網](http://www.michaelfogleman.com/craft/)、[GitHub](https://github.com/fogleman/Craft)

 

<h2 id="gui">GUI</h2>

 

這些具體來說就是[控件工具包](https://en.wikipedia.org/wiki/Widget_toolkit)

 

*   GTK+:一個跨平臺的控件工具包。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](http://www.gtk.org/)

*   IUP:另一個跨平臺的控件工具包。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](http://webserver2.tecgraf.puc-rio.br/iup/)

*   Tk:一個基本控件工具包,Tcl/Tk 的一部分。[Tcl/Tk License](http://www.tcl.tk/software/tcltk/license.html)。[官網](http://www.tcl.tk/)

*   XForms Toolkit:一個爲 XWindow 設計的控件工具包。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](http://xforms-toolkit.org/)

 

<h2 id="json">JSON</h2>

 

*   Jansson:一個編碼,解碼和處理 JSON 的 C 庫。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](http://www.digip.org/jansson/)

*   jsmn:一個極簡的 JSON 解析器。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](http://zserge.com/jsmn.html)

*   json-c:一個處理 JSON 的庫。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/json-c/json-c/wiki)

*   WJElement:高級 JSON 處理庫,支持 JSON Schema。任意版本的 LGPL。[官網](https://github.com/netmail-open/wjelement/)

*   YAJL:一個很快的 JSON 流解析 C 庫。[ISC](http://directory.fsf.org/wiki/License:ISC)。[官網](https://lloyd.github.io/yajl/)

 

<h2 id="learning-reference-and-tutorials">學習、參考和指南</h2>

 

下面列出了學習 C 編程的資源,或者跟 C 編程相關的有用的東西。

 

### 在線

 

#### 參考

 

*   [SEI CERT C 編碼標準](https://www.securecoding.cert.org/confluence/display/c/SEI+CERT+C+Coding+Standard)

*   [C FAQ:comp.lang.c 常見問題](http://c-faq.com/)

*   [GNU/Linux 下 C/POSIX 標準庫實現的比較](http://www.etalabs.net/compare_libcs.html)

*   [C11 標準草案](http://www.open-std.org/JTC1/SC22/WG14/)

*   [GNU C 參考手冊](https://www.gnu.org/software/gnu-c-manual/)

*   [Robert Pike 的 C 筆記](http://kamalatta.ddnss.de/otherdocs/pikestyle.html)

 

#### 初級

 

*   [指針教程](http://home.netcom.com/~tjensen/ptr/pointers.htm)

*   [C 語言指針 5 分鐘教程](http://blog.jobbole.com/25409/)

*   [C 語言內存地址基礎](http://blog.jobbole.com/44845/)

*   [C 語言函數指針基礎](http://blog.jobbole.com/44639/)

*   [C 語言指針和數組基礎](http://blog.jobbole.com/44863/)

*   [構建 C 項目](http://nethack4.org/blog/building-c.html)

*   [C 編程百科全書](https://en.wikibooks.org/wiki/C_Programming)

*   [“有趣”的 C 介紹](https://gist.github.com/eatonphil/21b3d6569f24ad164365)

*   [用 GDB 學習 C](https://www.recurse.com/blog/5-learning-c-with-gdb)

*   [POSIX 線程編程指南](https://computing.llnl.gov/tutorials/pthreads/) (有點過時,但大部分還是有效和有用的)

*   [GNU C 編程指南](http://www.crasseux.com/books/ctut.pdf) (在線 PDF)

*   [C 語言中的模板](http://blog.pkh.me/p/20-templating-in-c.html)


 

#### 中級

 

*   [8 個你應該知道的 GDB 技巧](https://blogs.oracle.com/ksplice/entry/8_gdb_tricks_you_should)

*   [10 個 C99 技巧](http://blog.noctua-software.com/c-tricks.html)

*   [深入併發:嘗試互斥鎖和原子操作](http://jvns.ca/blog/2014/12/14/fun-with-threads/)

*   [OpenMP 介紹](https://www.youtube.com/playlist?list=PLLX-Q6B8xqZ8n8bwjGdzBJ25X2utwnoEG) (視頻)

*   [OpenMP 指南](https://computing.llnl.gov/tutorials/openMP/) (針對 OpenMP3 標準)

*   [memcpy 與 memmove 的比較](http://www.tedunangst.com/flak/post/memcpy-vs-memmove)

*   [MPI 指南](https://computing.llnl.gov/tutorials/mpi/)

*   [C 語言中一些未知特性或者技巧](http://proprogramming.org/some-unknown-features-or-tricks-in-c-language/)

*   [失落的 C 語言結構體封裝藝術](http://blog.jobbole.com/57822/)

*   [C 程序員需要了解的內存知識](http://marek.vavrusa.com/c/memory/2015/02/20/memory/)

*   [每個 C 程序員需要知道的未定義行爲知識](http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html)

 

#### 高級

 

*   [C 中的高級元編程](http://250bpm.com/blog:56)

*   [一個快速教程:如何實現和調試 malloc,free,calloc,和 realloc](http://danluu.com/malloc-tutorial/)

*   [位操作技巧](https://graphics.stanford.edu/~seander/bithacks.html)

*   [我不懂 C](http://kukuruku.co/hub/programming/i-do-not-know-c)

*   [在 C 語言中實現智能指針](https://snai.pe/c/c-smart-pointers/)

*   [C 中的內聯函數](http://www.greenend.org.uk/rjk/tech/inline.html)

*   [C 中的自定義控制結構元編程](http://www.chiark.greenend.org.uk/~sgtatham/mp/)

*   [用 C 的宏解決臨時內存問題](http://www.samnip.ps/thought/macro-storage-for-inverse-comma)

*   [C 語言中一些不爲人知的角落](https://docs.google.com/presentation/d/1h49gY3TSiayLMXYmRMaAEMl05FaJ-Z6jDOWOz3EsqqQ/edit?pli=1#slide=id.gaf50702c_0153)

*   [編寫高效的 C 和 C 代碼優化](http://www.codeproject.com/Articles/6154/Writing-Efficient-C-and-C-Code-Optimization)

 

#### 自學教程

 

*   [C 語言認證協會預備課程](http://www.cppinstitute.org/?page_id=1487)

 

### 實體書

 

#### 參考資料

 

*   [C: A Reference Manual 5E](http://careferencemanual.com/):C99 完全參考手冊

*   [C Pocket Reference](http://shop.oreilly.com/product/9780596004361.do):C99 簡明參考手冊

*   [The C Programming Language 2E](https://en.wikipedia.org/wiki/The_C_Programming_Language):第一本 C 語言書籍,由 C 的創造者編寫。

 

#### 初級

 

*   [C Primer Plus 6E](http://www.pearsonhighered.com/educator/product/C-Primer-Plus-6E/9780321928429.page):一個全面的 C11 編程指南。

*   [C Programming: A Modern Approach](http://knking.com/books/c2/index.html):一本極好的學習 C 基礎的書。

*   [Head First C](http://shop.oreilly.com/product/0636920015482.do):一本“深入淺出”風格的學習 C 的書籍。

 

#### 中級

 

*   [21st Century C](http://shop.oreilly.com/product/0636920033677.do):一本非常好的 C 語言書籍,可作爲第二選擇。

*   [Understanding and Using C Pointers](http://shop.oreilly.com/product/0636920028000.do):一本深入討論 C 指針的書。

*   [ZeroMQ](http://shop.oreilly.com/product/0636920026136.do):一本介紹如何用 C 使用 ZeroMQ 的書。

 

#### 高級

 

*   [Expert C Programming: Deep C Secrets](http://dl.acm.org/citation.cfm?id=179241):一本從有趣,深度和娛樂的視角分析 C 內部結構的書籍。

 

<h2 id="multimedia">多媒體</h2>

 

*   FFMPEG:一個完整,跨平臺的錄音,轉換和流化視頻以及音頻的解決方案。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) 或更高版本,部分是 [GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) 或更高版本。[官網](https://www.ffmpeg.org/)

*   GStreamer:一個聲音和可視化媒體的框架。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](http://gstreamer.freedesktop.org/)

*   lodepng:一個簡單的 PNG 圖像解碼器和編碼器,不需要其他依賴。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause).[官網](http://lodev.org/lodepng/)

 

<h2 id="networking-and-internet">網絡編程</h2>

 

*   asnlc:一個把 ASN.1 規範轉換爲 C 代碼的編譯器。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](http://lionet.info/asn1c/compiler.html)

*   czmq:一個 ZeroMQ 的高級綁定。[官網](https://github.com/zeromq/czmq)

*   GNU adns:一個高級,易用,異步的 DNS 客戶端和實用工具。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 及更高版本。[官網](https://gnu.org/software/adns/)

*   GNU SASL:一個簡單身份認證和安全層和一些常見 SASL 機制的實現。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 及更高版本。[官網](https://gnu.org/software/gsasl/)

*   GnuTLS:一個安全通信庫,實現了 SSL,TLS 和 DTLS。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) 及更高版本。[官網](http://www.gnutls.org/)

*   gumbo-parser:一個 C99 標準的 HTML5 解析庫。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](https://github.com/google/gumbo-parser)

*   http-parser:一個 HTTP 請求迴應解析器。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/nodejs/http-parser)

*   ldns:一個簡化 DNS 編程的庫。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](http://www.nlnetlabs.nl/projects/ldns/index.html)

*   libcurl:一個客戶端的 URL 轉換庫,支持多種格式。[curl license](http://curl.haxx.se/docs/copyright.html)。[官網](http://curl.haxx.se/libcurl/)

*   LibEtPan:一個郵件庫,支持 IMAP,SMTP,POP 和 NNTP 網絡協議。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](https://github.com/dinhviethoa/libetpan)

*   libev:一個事件驅動庫。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD").[官網](http://software.schmorp.de/pkg/libev.html)

*   [libevent](http://hao.jobbole.com/libevent/):一個在網絡服務器中事件驅動庫的可替代品。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](http://libevent.org/)

*   libgss:通用安全服務。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://gnu.org/software/gss/)

*   libhttpd:一個給應用或嵌入式設備添加基本 Web 服務器功能的庫。[GNU GPL2](http://www.gnu.org/licenses/gpl.html)。[官網](http://www.hughes.com.au/products/libhttpd/)

*   libidn:Stringprep,Punycode 和 IDNA 規範的實現。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://gnu.org/software/libidn/)

*   libmicrohttpd:一個迷你庫,可作爲其他應用的一部分,讓運行 HTTP 服務器變得簡單。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) 或更高版本。[官網](https://gnu.org/software/libmicrohttpd/)

*   libsoup:一個 GNOME HTTP 客戶端/服務器庫,使用了 GObject。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](https://wiki.gnome.org/action/show/Projects/libsoup?action=show&redirect=LibSoup)

*   lwan:一個實驗性,可擴展,高性能的 HTTP 服務器。 [GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](https://github.com/lpereira/lwan)

*   [mongoose](http://hao.jobbole.com/mongoose/):基於 C 的嵌入式 Web 服務器。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](https://github.com/cesanta/mongoose)

*   nanomsg:一個基於 C 的 ZeroMQ 實現。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/nanomsg/nanomsg)

*   onion:易於使用的 HTTP 服務器庫。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](https://github.com/davidmoreno/onion)

*   OpenSSL:一個 SSL 和 TLS 協議的實現,還包括一個加密庫。[Dual Licensed under the OpenSSL License and the SSLeay License](https://www.openssl.org/source/license.html)。[官網](https://www.openssl.org/)

*   oSip:一個基於 C 的 SIO 實現,沒有額外的依賴。[GNU LGPLv2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) 或更高版本。[官網](https://gnu.org/software/osip/)

*   s2n:一個 C99 標準的 TLS/SSL 協議的實現,簡單,快並且以安全優先。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](https://github.com/awslabs/s2n)

*   socket99:BSD 套接字 API 的 C99 封裝。[ISC](http://directory.fsf.org/wiki/License:ISC)。[官網](https://github.com/silentbicycle/socket99)

*   Tox:一個通信平臺,被設計爲 Skype 殺手。[GNU GPL3](http://www.gnu.org/licenses/gpl.html)。[官網](https://github.com/irungentoo/toxcore)

*   twitc:一個與 Twitter OAuth API 交互的迷你 C 庫。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/sinemetu1/twitc)

 

<h3 id="web-frameworks">Web框架</h3>

 

*   balde:一個基於 GLib 的 C 微框架。 [GNU LGPLv2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](https://github.com/balde/balde)

 

<h2 id="#numerical">數值計算</h2>

 

*   apophenia:一個用於統計和科學計算的庫。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](https://github.com/b-k/apophenia)

*   ATLAS:自動調諧線性代數軟件。 [3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](http://math-atlas.sourceforge.net/)

*   BLAS:Basic Linear Algebra Subprograms;提供向量和矩陣操作的一系列操作。[BLAS license](http://www.netlib.org/blas/#_licensing)。[官網](http://www.netlib.org/blas/)

*   Cuba:一個計算多維的數值積分的庫。 [GNU LGPLv3](http://www.gnu.org/licenses/lgpl.html)。[官網](http://www.feynarts.de/cuba/)

*   FFTW:The Fastest Fourier Transform in the West;一個高度優化的快速傅立葉變換例程。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) 或更高版本。[官網](http://www.fftw.org/)

*   FLINT:Fast Library for Number Theory;一個支持算數,多項式,冪級數和矩陣等。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) 或更高版本。[官網](http://flintlib.org/)

*   GLPK:GNU Linear Programming Kit;一個求解大規模線性規劃,混合整數規劃和其他相關問題。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://gnu.org/software/glpk/)

*   GMP:GNU Multple Precision Arithmetic Library;一個支持任意精度計算的庫。雙重許可 [GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) 和 [GNU LGPLv3](http://www.gnu.org/licenses/lgpl.html)。[官網](https://gmplib.org/)

*   GNU MPC:一個支持複雜數字計算的庫。[GNU LGPL3](http://www.gnu.org/licenses/lgpl.html) 或更高版本。[官網](http://www.multiprecision.org/index.php?prog=mpc&page=home)

*   GNU MPFR:一個支持任意精度的浮點數計算庫。[GNU LGPL3](http://www.gnu.org/licenses/lgpl.html) 或更高版本(大多數最近版本),[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) 或更高版本(2.4.x 之前)。[官網](http://mpfr.loria.fr/index.html)

*   GNU MPRIA:一個支持多精度合理區間運算的可擴展數學庫。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://gnu.org/software/mpria/)

*   GSL:The GNU Scientific Library;一個精確的數值計算庫。[GNU GPL3](http://www.gnu.org/licenses/gpl.html)。[官網](http://www.gnu.org/software/gsl/)

*   KISS FFT:一個非常快的傅里葉變換庫。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](http://sourceforge.net/projects/kissfft/)

*   LAPACKE:一個 [LAPACK](http://www.netlib.org/lapack/) 的 C 接口。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](http://www.netlib.org/lapack/lapacke.html)

*   PARI/GP:一個數論的計算機代數系統,包括 C 編譯器。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) 或更高版本。[官網](http://pari.math.u-bordeaux.fr/)

*   PETSc:一系列數據結構和例程,用於計算由偏微分方程建模的應用程序的可擴展並行解。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](http://www.mcs.anl.gov/petsc/)

*   SLEPc:一個在並行計算機中的解決大型,稀疏特徵值問題的軟件庫。[LGPL3](http://www.gnu.org/licenses/lgpl.html)[官網](http://slepc.upv.es/)

*   Yeppp!:非常快,SIMD 優化的數學庫。 [3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](http://www.yeppp.info/)

 

<h2 id="parallel-programming">並行編程</h2>

 

*   cchan:一個線程間通信通道構建的小型庫。公共領域。[官網](http://repo.hu/projects/cchan/)

*   ck:併發原語,安全內存回收機制和非阻塞數據結構。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://github.com/concurrencykit/ck)

*   mill:用 C 寫成的 Go 風格併發。[X11](https://directory.fsf.org/wiki/License:X11)[官網](http://libmill.org/)

*   MPICH:MPI 的另一種實現。[MPICH licence](http://git.mpich.org/mpich.git/blob_plain/6aab201f58d71fc97f2c044d250389ba86ac1e3c:/COPYRIGHT)。[官網](http://www.mpich.org/)

*   OpenMP:一組 C 編譯指令,使其易於並行化代碼。標準(許可不適用)。[官網](http://openmp.org/wp/about-openmp/)

*   OpenMPI:一個消息傳輸接口實現。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](https://github.com/open-mpi/ompi)

*   PETSc:一系列數據結構和例程,用於計算由偏微分方程建模的應用程序的可擴展並行解。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](http://www.mcs.anl.gov/petsc/)

*   pth:一個非搶佔式優先級調度多線程執行的可擴展實現。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或者更高版本。[官網](https://gnu.org/software/pth/)

*   pthreads:POSIX 線程庫。標準(沒有適用的許可)。[官網](https://en.wikipedia.org/wiki/POSIX_Threads)

*   SLEPc:一個在並行計算機中的解決大型,稀疏特徵值問題的軟件庫。[GNU LGPL3](http://www.gnu.org/licenses/lgpl.html)。[官網](http://slepc.upv.es/)

*   TinyCThread:一個可擴展,小型的 C11 標準線程 API 實現。[zlib](http://directory.fsf.org/wiki/License:Zlib)。[官網](https://tinycthread.github.io/)

 

<h2 id="regex">正則表達式</h2>

 

> 有些人遇到問題時就會想:“啊,我知道了,我可以使用正則表達式”。於是現在他們有了兩個問題。- Jamie Zawinski。

 

*   PCRE:與 Perl 5 正則表達式完全相同的實現。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](http://www.pcre.org/)

*   SLRE:Super Light Regular Expression library;一個 Perl 正則表達式語法子集的迷你實現。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](https://github.com/cesanta/slre)

*   TRE:一個與 POSIX 一致,充滿特色的正則表達式庫。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://github.com/laurikari/tre/)

*   PS:關於正則表達式,deerchao 有篇文章不錯 《[正則表達式 30 分鐘入門教程](http://blog.jobbole.com/96708/)》

 

<h2 id="serialization">序列化</h2>

 

*   c-capnproto:一個 Cap'n Proto 序列化協議的實現。 [Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/jmckaskill/c-capnproto)

*   cmp:一個 [MessagePack](http://msgpack.org/) 序列化協議的實現。 [Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/camgunz/cmp)

*   libavro:一個 Avro 數據序列化系統的 C 實現。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](http://avro.apache.org/docs/current/api/c/index.html#_introduction_to_avro_c)

*   mpack:另一個 [MessagePack](http://msgpack.org/) 序列化協議的實現。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/ludocode/mpack)

*   protobuf-c:一個 Google Protocol Buffer 的 C 實現。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://github.com/protobuf-c/protobuf-c)

*   xdr:External Data Representation;數據序列化標準。標準(沒有可用許可)。[官網](https://en.wikipedia.org/wiki/External_Data_Representation)

 

<h2 id="source-code-collections">源碼集錦</h2>

 

下面包含了一些小型源碼集合。如果你想要大型且成熟的,看《框架》那一節。

 

*   CCAN:模仿 Perl 的 CPAN,這是一個大的實用 C 代碼集合。完整的列表在 [這裏](http://ccodearchive.net/list.html)。多種許可(所有都是免費軟件)。[官網](http://ccodearchive.net/)

*   clib:一個 C 軟件包管理器,配備了一堆自己的庫。 [Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/clibs/clib)

*   gnulib:通用 GNU 代碼的集合。多種許可證,全部免費。[官網](https://www.gnu.org/software/gnulib/)

*   libdjb:做各種事情的庫的集合。(顯然)公共領域。[官網](http://www.fefe.de/djb/)

 

<h2 id="standard-libraries">標準庫</h2>

 

下面包括了標準 C 庫。

 

*   Bionic:谷歌爲 Android 開發的 C 標準庫。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](https://github.com/android/platform_bionic)

*   dietlibc:標準 C 庫,可能是最小的二進制文件。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](http://www.fefe.de/dietlibc/)

*   glibc:GNU C 庫。一個 C 標準庫的實現。 [GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](http://www.gnu.org/software/libc/)

*   musl:標準 C 庫,兼容 POSIX 2008 和 C11,爲靜態鏈接設計。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](http://www.musl-libc.org/)

 

<h2 id="string-manipulation">字符串處理</h2>

 

*   bstrlib:更好的字符串處理庫。雙重許可,[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause) 或 [GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](http://bstring.sourceforge.net/)

*   ICU:International Components for Unicode;提供 Unicode 支持的庫。 [ICU license](http://source.icu-project.org/repos/icu/icu/trunk/license.html)。[官網](http://site.icu-project.org/)

*   libunistring:處理 Unicode 字符串的 C 庫。[GNU LGPL3](http://www.gnu.org/licenses/lgpl.html)。[官網](https://gnu.org/software/libunistring/)

*   libgiconv:文本轉換庫。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)(庫),[GNU GPL3](http://www.gnu.org/licenses/gpl.html)(編碼轉換程序)。[官網](https://gnu.org/software/libiconv/)

*   SDS:Simple Dynamic Strings;一個用簡單方式處理 C 字符串的庫,而且兼容標準 C 字符串函數。可通過 [clib](https://github.com/clibs/clib) 使用。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://github.com/antirez/sds)

*   shoco:一個小型文本壓縮器。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/Ed-von-Schleck/shoco)

*   smaz:一個高效的字符串壓縮庫。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause).[官網](https://github.com/Ed-von-Schleck/shoco)

 

<h2 id="testing">測試工具</h2>

 

*   CHEAT:一個非常簡單的單元測試框架。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://github.com/Tuplanolla/cheat)

*   Check:一個 C 的單元測試框架。[GNU LGPL2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](http://check.sourceforge.net/)

*   CMock:一個 C 的 mock/stub 生成器。[官網](https://github.com/ThrowTheSwitch/CMock)

*   cmocka:一個支持 mock 對象的單元測試框架。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](https://cmocka.org/)

*   Criterion:一個 KISS 風格,非侵入式的 C 測試框架。[Expat](http://directory.fsf.org/wiki/License:Expat)[官網](https://github.com/Snaipe/Criterion)

*   CUnit:另一個 C 的單元測試框架。[GNU LGPL2.0](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](http://cunit.sourceforge.net/)

*   minunit:極小的 C 單元測試框架。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/siu/minunit)

*   Unity:一個簡單的 C 單元測試框架。 [Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/ThrowTheSwitch/Unity)

 

<h2 id="text-editor-extensions">文本編輯器擴展</h2>

 

在幾乎任何像樣的文本編輯器支持 C 之際,有一些擴展,讓編輯器更加令人愉快。下面是根據編輯器分目錄的。

 

### Emacs

 

*   CEDET:Collection of Emacs Development Environment Tools;給 Emacs 提供一種類似 IDE 的特點,是內建的。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](http://cedet.sourceforge.net/)

*   Flycheck:現代語法檢查。對於 C,它可以使用 GCC 或者 Clang 作爲後端。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://github.com/flycheck/flycheck)

*   Yasnippet:一個模板系統,支持 C 的通用代碼片段。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://github.com/capitaomorte/yasnippet)

 

### Vim

 

*   Syntastic:語法檢查和語言分析。[Do What The Fuck You Want To license](https://github.com/scrooloose/syntastic/blob/master/LICENCE)。[官網](https://github.com/scrooloose/syntastic)

*   [YouCompleteMe](http://hao.jobbole.com/youcompleteme/):一個 Vim 的代碼補全引擎。[GNU GPL3](http://www.gnu.org/licenses/gpl.html)。[官網](http://valloric.github.io/YouCompleteMe/)

 

<h2 id="tools">工具</h2>

 

下面是實用的程序列表,包括了幫助你編寫和調試 C 代碼的庫或者編譯器,不包括編輯器。

 

*   adlint:一個靜態分析器。支持完全的 C89 標準和部分 C99 標準。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://yanoh.github.io/adlint/)

*   Artistic Style:一個支持 C 的小而快的自動化代碼格式化工具。[GNU LGPL3](http://www.gnu.org/licenses/lgpl.html)。[官網](http://astyle.sourceforge.net/)

*   address-sanitizer:一個很快的內存錯誤探測器。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](https://github.com/google/sanitizers)

*   [biicode](http://hao.jobbole.com/biicode/):一個現代的 C 依賴管理器。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://biicode.github.io/biicode/)

*   c:在命令行中編譯和執行 C 腳本,也支持 shebang。 [Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/ryanmjacobs/c)

*   c99sh:用 hash-bang 運行 C 文件。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://github.com/RhysU/c99sh)

*   CBMC:C Bounded Model Checker;一個檢查數組邊界,指針安全和用戶自定義斷言的工具。[Original BSD](https://directory.fsf.org/wiki/License:BSD_4Clause)。[官網](http://www.cprover.org/cbmc/)

*   cdecl:一個在線服務,能夠把 C 的聲明翻譯成英文,反向也可以。公共領域。[官網](https://github.com/mpv-player/mpv)

*   cinclude2dot:在 C 項目中使用 Graphviz 的圖像包含依賴。任官網 GNU GPL 版本(根據文件中的要求)[官網](https://www.flourish.org/cinclude2dot/)

*   [Complexity](http://hao.jobbole.com/complexity/):一個測量 C 代碼複雜性的工具。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://www.gnu.org/software/complexity/)

*   DDD:各種命令行調試器的圖形前端。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://www.gnu.org/software/ddd/ddd.html)

*   fab:讓每次構建都最優的構建系統。[GNU GPL3](http://www.gnu.org/licenses/gpl.html)。[官網](http://fabutil.org/)

*   GDB:The GNU Project debugger;一個 C 調試器。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](http://www.gnu.org/software/gdb/)

*   Glade:一個讓 TK+ GUIs 開發更快的 RAD 工具。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](https://glade.gnome.org/)

*   GMSL:GNU Make Standard Library;一個 GNU Make 額外功能的集合。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](http://gmsl.sourceforge.net/)

*   GNU Global:一個 C 的源碼標籤工具。[GNU GPL3](http://www.gnu.org/licenses/gpl.html)。[官網 Global](https://www.gnu.org/software/global/)

*   gprof:一個性能分析工具。GNU binutils 的一部分。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](http://www.gnu.org/software/binutils/)

*   Highlight:把源碼轉化爲高亮的格式化文本。[GNU GPL3](http://www.gnu.org/licenses/gpl.html)。[官網](http://www.andre-simon.de/index.php)

*   include-what-you-use:幫助程序員發現不必要的包含和提供解決他們的建議。基於 LLVM/Clang(只能與它一起工作)。[NCSA](http://directory.fsf.org/wiki/License:IllinoisNCSA)。[官網](https://github.com/include-what-you-use/include-what-you-use)

*   indent:自動格式化 C 代碼,讓它更容易閱讀。也能把一種風格的代碼轉化爲另一種。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://www.gnu.org/software/indent/)

*   Make:一個控制程序的可執行和其他非代碼文件的生成的工具。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本(鏈接到 GNU 的實現)。[官網](https://www.gnu.org/software/make/)

*   qo:無需分開的配置文件的構建系統。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/andlabs/qo)

*   rr:記錄非確定執行來允許可確定調試的調試器。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](http://rr-project.org/)

*   tup:一個很快,基於文件,跨平臺的構建系統。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](http://gittup.org/tup/index.html)

*   unifdef:移除 #ifdef 和 #if 指令包含的文本,不會改變文件的其他部分。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause) 和 [FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](http://dotat.at/prog/unifdef/)

*   Valgrind:各種動態分析工具,包括一個內存泄漏檢測工具。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](http://www.valgrind.org/)

 

<h2 id="utilities">其他工具</h2>

 

下面是包羅萬象的目錄,主要是那些不適合放在其他目錄的東西。

 

*   ApeTagLibs:APEv2 標籤的 C 庫。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/jeremyevans/ape_tag_libs/tree/master/c)

*   bfd:處理二進制對象文件的庫。GNU binutils 的一部分。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](http://sourceware.org/binutils/docs/bfd/)

*   [ccv](http://hao.jobbole.com/ccv/):基於C語言、帶緩存機制的現代計算機視覺核心庫。 [3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](https://github.com/liuliu/ccv)

*   [cf4ocl](http://hao.jobbole.com/cf4ocl/):The C Framework for OpenCL;一個跨平臺面向對象框架,用於開發和用基準問題測試 [OpenCL](https://www.khronos.org/opencl/) 項目。[GNU LGPL3](http://www.gnu.org/licenses/lgpl.html)(庫), [GNU GPL3](http://www.gnu.org/licenses/gpl.html)(其他代碼)。[官網](https://fakenmc.github.io/cf4ocl/)

*   CommonMark:CommonMark 規範的 C 實現。[Variety of licenses, all free](https://github.com/jgm/CommonMark/blob/master/LICENSE)。[官網](https://github.com/jgm/CommonMark)

*   CException:異常的 C 實現。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/ThrowTheSwitch/CException)

*   docopt.c:命令行選項解析器的 C 實現。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/docopt/docopt.c)

*   dyncall:另一個外部函數接口庫。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](http://www.dyncall.org/)

*   FANN:Fast Artifical Neural Network library;一個神經網絡的實現。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](http://leenissen.dk/fann/wp/)

*   Firm:一個 C 庫,提供了基於圖像中間表示,優化和適合編譯器的彙編代碼生成。配備了 C 的前端例子,使用相同的許可。[GNU LGPLv2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)。[官網](http://pp.ipd.kit.edu/firm/Index)

*   gjrand:隨機數字生成的例程庫。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) 或者 [GNU GPLv3](http://www.gnu.org/licenses/gpl.html)(用戶的選擇)。[官網](http://sourceforge.net/projects/gjrand/)

*   GNU FreeIPMI:一個帶內和帶外的 IPMI 實現。[GNU GPL3](http://www.gnu.org/licenses/gpl.html)。[官網 FreeIPMI](https://gnu.org/software/freeipmi/index.html)

*   GNU gperf:一個完美的哈希函數生成器,提供一系列的字符串。輸出 C 代碼。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://www.gnu.org/software/gperf/)

*   GNU Libffcall:一個構建外部函數接口庫的集合。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://gnu.org/software/libffcall/)

*   gperftools:一系列測量和提高性能的實用工具集合。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](https://github.com/gperftools/gperftools)

*   hammer:二進制格式的解析器組合。[GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html).[官網](https://github.com/abiggerhammer/hammer)

*   Hans Boehm GC:C 的垃圾收集器?如果我用了不要介意。多種許可證,完全免費。[官網](http://www.hboehm.info/gc/)

*   huffandpuff:一個極小的哈夫曼編碼器和解碼器。公共領域。[官網](https://github.com/adamierymenko/huffandpuff)

*   iniparser:一個 .ini 文件的解析器。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/ndevilla/iniparser)

*   jemalloc:一個 malloc 實現,着重於段錯誤的避免和可擴展併發支持。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](http://www.canonware.com/jemalloc/)

*   jwHash:一個很快的哈希表實現。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](https://github.com/watmough/jwHash)

*   kdtree:KD-trees 的簡單庫。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](https://github.com/jtsiomb/kdtree)

*   Kitsune:高效,通用的框架,用於軟件的動態升級。 [GNU LGPL3](http://www.gnu.org/licenses/lgpl.html) 或更高版本。[官網](http://kitsune-dsu.com/)

*   libavl:一個包括各種自平衡二叉樹的庫。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](http://adtinfo.org/libavl.html/index.html)

*   libbson:BSON 實用庫。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](https://github.com/mongodb/libbson)

*   libCello:引入高級語言給 C 的庫。[官網](http://libcello.org/)

*   libcox:一個運行跨平臺系統調用和跨系統標準工具的庫。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](http://libcox.net/)

*   libffi:輕量級的外部函數接口庫。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/atgreen/libffi)

*   libgit2:Git 的純 C 實現。[GNU GPL2 only, with a linking exception](https://github.com/libgit2/libgit2/blob/master/COPYING)。[官網](https://libgit2.github.com/)

*   libimobiledevice:一個跨平臺協議庫,用於與 iThings 通信。[GNU LGPLv2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) 或更高版本(庫),[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) 或更高版本(工具)。[官網](https://github.com/libimobiledevice/libimobiledevice)

*   libmpv:音樂播放庫。編譯的時候加入 `./waf configure --disable-cplayer --enable-libmpv-shared` 來避免生成音樂播放器。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) 或更高版本。[官網](https://github.com/mpv-player/mpv)

*   libnfc:一個平臺獨立的 NFC 庫。[GNU LGPL3](http://www.gnu.org/licenses/lgpl.html)。[官網](https://github.com/nfc-tools/libnfc)

*   [libPhenom](http://hao.jobbole.com/libphenom/):事件框架,用於構建高擴展和高性能系統。[Apache2.0](http://directory.fsf.org/wiki/License:Apache2.0)。[官網](http://facebook.github.io/libphenom/index.html)、[GitHub](https://github.com/facebook/libphenom)

*   libsoundio:跨平臺,實時音頻輸入輸出的庫,有很多種後端。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/andrewrk/libsoundio)

*   libucl:通用配置庫解析器。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://github.com/vstakhov/libucl)

*   libudp:一個統一設計模式的 C 實現。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://notabug.org/koz.ross/libudp)

*   libuv:跨平臺異步 I/O。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/libuv/libuv)

*   libYAML:一個 YAML 1.1 解析器和發射器。 [Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](http://www.pyyaml.org/wiki/LibYAML)

*   lzo:一個很快的數據壓縮庫。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](http://www.oberhumer.com/opensource/lzo/)

*   mpc:解析器組合庫。[FreeBSD](http://directory.fsf.org/wiki?title=License:FreeBSD "License:FreeBSD")。[官網](https://github.com/orangeduck/mpc)

*   ncurses:彩色的終端 UI 庫。[GNU GPL3](http://www.gnu.org/licenses/gpl.html) 或更高版本。[官網](https://gnu.org/software/ncurses/)

*   nope.c:一個基於 C 語言,超級輕量級的軟件平臺,用於可擴展服務端和網絡應用的開發(想想 C 程序員的 nodejs)。[官網](https://github.com/riolet/nope.c)

*   pbc:一個協議緩衝庫。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/cloudwu/pbc)

*   rabbitmq-c:[RabbitMQ](http://www.rabbitmq.com/) 的客戶端庫。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/alanxz/rabbitmq-c)

*   Ragel:爲編譯C的狀態機的DSL。[GNU GPL2.1](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)。[官網](http://www.colm.net/open-source/ragel/)

*   uthash:哈希表實現,允許已經存在的數據結構很容易地存在哈希表裏面。[1-clause BSD](http://troydhanson.github.io/uthash/license.html)。[官網](http://troydhanson.github.io/uthash/)

*   Viola:libCello 的簡化版本。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](https://github.com/eatonphil/Viola)

*   zlib:一個相當漂亮卻精緻不張揚的壓縮庫。[3-clause BSD](http://directory.fsf.org/wiki/License:BSD_3Clause)。[官網](https://github.com/madler/zlib)

*   [Sundown](http://hao.jobbole.com/sundown/):一個用C編寫的符合標準的、快速的、安全的源碼解析器。[官網](https://github.com/vmg/sundown)

 

<h2 id="xml">XML</h2>

 

> “XML 是垃圾。真的,沒有任何藉口。XML 對人類不友好的,甚至對於電腦來說也是一場災難。根官網 -Linus Torvalds

 

*   [Expat](http://hao.jobbole.com/expat/):面向流的 XML 解析器。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](http://www.libexpat.org/)

*   libxml2:一個符合標準,輕量級的 XML 解析器。[Expat](http://directory.fsf.org/wiki/License:Expat)。[官網](http://xmlsoft.org/)

*   [mini-xml](http://hao.jobbole.com/mini-xml/):小型 XML 讀寫庫。沒有 C 標準庫的依賴。[GNU LGPL2.1 with static linking exception](http://svn.msweet.org/mxml/trunk/COPYING)。[官網](http://www.msweet.org/projects.php?Z3)

 

<h2 id="resources-2">其他資源</h2>

 

<h3 id="influential-books">有影響力的書</h3>

*具有廣泛影響且值得閱讀的 C 語言經典書籍。*

* 待補充

 

<h3 id="websites-blogs">知名網站/博客</h3>

*值得關注的 C 語言技術站點和博客。*

<h4>中文</h4>

 

* 待補充

 

<h4>英文</h4>

 

* 待補充

 

<h3 id="weibo-weixin">微信公衆號</h3>

* CPP開發者:專注分享 C/C++ 開發相關的技術文章和工具資源。

<br><img src="http://ww1.sinaimg.cn/small/63918611gw1epb2c4w55aj2046046t8t.jpg" width=150 height=150>

 

發佈了23 篇原創文章 · 獲贊 26 · 訪問量 10萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章