compat.libpng
#includePNG reference library — portable PNG encode/decode (depends on zlib)
#include "png.h"
mcpp add compat.libpng@1.6.43
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// Smoke test — verify compat.libpng builds, links, and basic API works
#include "png.h"
import std;
int main() {
auto* png = png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
if (!png) return 1;
auto* info = png_create_info_struct(png);
if (!info) { png_destroy_read_struct(&png, nullptr, nullptr); return 2; }
std::println("compat.libpng smoke test: ok");
png_destroy_read_struct(&png, &info, nullptr);
return 0;
}
tests/examples/libpng/tests/read.cpp · 專案 tests/examples/libpng
建置
- targets
libpng (lib)- language
c++23- C standard
c99- import std
- no
- include dirs
*, mcpp_generated
原始檔 (15)
*/png.c*/pngerror.c*/pngget.c*/pngmem.c*/pngpread.c*/pngread.c*/pngrio.c*/pngrtran.c*/pngrutil.c*/pngset.c*/pngtrans.c*/pngwio.c*/pngwrite.c*/pngwtran.c*/pngwutil.c
產生的檔案
mcpp_generated/pnglibconf.h
版本
| 版本 | 平台 | 鏡像 | sha256 |
|---|---|---|---|
1.6.43 最新 |
LinuxWindowsmacOS | 來源 | fecc95b46cf0… |