C Apache-2.0

C-examples

C语言学习项目

L

leleliu008

Dernière activité 16 juil. 2026
leleliu008/C-examples

285

étoiles

72

forks

5

issues ouvertes

Ce README est souvent en anglais.

C

一级目录 二级目录 三级目录 说明
standard iso ISO C的一些测试文件,其中大部分需要通过GDB调试进行查看
standard posix POSIX标准的测试文件
library mbedTLS base64 mbedTLS / base64.h的使用案例
library mbedTLS AES mbedTLS / aes.h的使用案例
library mbedTLS MD5 mbedTLS / md5.h的使用案例
library mbedTLS RIPEMD-160 mbedTLS / ripemd160.h的使用案例
library mbedTLS SHA1 mbedTLS / sha1.h的使用案例
library mbedTLS SHA256 mbedTLS / sha256.h的使用案例
library mbedTLS SHA512 mbedTLS / sha512.h的使用案例
library mbedTLS HMAC mbedTLS / md.h的使用案例
library mbedTLS PBKDF2 mbedTLS / pkcs5.h的使用案例
library openssl SHA256 openssl / sha.h的使用案例
library libcurl libcurl的使用案例
library cJSON cJSON的使用案例
library libyaml libyaml的使用案例
library libgit2 libgit2的使用案例
library libarchive libarchive的使用案例
library qrencode qrencode的使用案例
algorithm base16 Base16算法的实现
algorithm url URL编解码算法的实现
algorithm bcc BCC校验算法的实现
algorithm lrc LRC校验算法的实现
algorithm chinese-calendar 中国阳历日期转换为阴历日期、节气、节日算法的实现

开发测试过程

step1. 安装vcpkg

git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
export VCPKG_ROOT="$PWD/vcpkg"
export PATH="$VCPKG_ROOT:$PATH"

step2. 通过vcpkg安装依赖库

vcpkg install curl libyaml libgit2 libarchive libqrencode cunit

step3. 配置

cmake \
    -S . \
    -B build.d \
    -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
    -DCMAKE_VERBOSE_MAKEFILE=ON \
    -DCMAKE_BUILD_TYPE=Debug \
    -DENABLE_TESTING=ON

step4. 编译

cmake --build build.d

step5. 运行单元测试

ctest --test-dir build.d/algorithm/base16

step6. 运行valgrind测试

valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --error-exitcode=1 build.d/algorithm/base16

release安装过程

step1. 安装vcpkg

git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
export VCPKG_ROOT="$PWD/vcpkg"
export PATH="$VCPKG_ROOT:$PATH"

step2. 通过vcpkg安装依赖库

vcpkg install curl libyaml libgit2 libarchive libqrencode cunit

step3. 配置

cmake \
    -S . \
    -B build.d \
    -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
    -DCMAKE_INSTALL_PREFIX=./output \
    -DCMAKE_VERBOSE_MAKEFILE=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DENABLE_TESTING=OFF

step4. 编译

cmake --build build.d

step5. 安装

cmake --install build.d

Projets similaires

「CNote」一份涵盖大部分学习 C 语言所需要掌握的核心知识,致力于打造最易懂的 C语言入门教程,让天下没有难学的 C语言。(包含C语言教程、C语言精华文章)

WWeikezi-AI
3,3 k étoiles448

A collection of C projects designed to help you practice, experiment, and understand core programming concepts in C.

Ccc-programmingpractice
Mmrparsing
291 étoiles18

学习记录

C
Mming1016
3,9 k étoiles761