mcpp index

compat.libpng

#include

PNG 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…