ph_.lib -- create small window command line .exe
[page last modified 9/13/2019]

For latest version go to paulhoule.com/ph_ ph_.lib is a tiny C stdlib replacement to produce smaller .exe files. It is intended to support only a little-endian architecture (eg. X86) and the Microsoft Visual C compiler. 32 and 64 bit versions are provided. Only a small subset of the C stdlib is implemented (to see what is available look at the #define's at the top of ph_.h). What is implemented is compatible with MSVC, so a build-time switch to select ph_/MSVC is possible -- a design goal for testing. The library supports "text" mode output, converting 0xa to 0xd, 0xa. Text mode input is not supported; files must be read in binary mode. Ver 1.x are pretty much "proof of concept" only -- not even command line arguments (argc and argv) are supported. The target user of ph_.lib is a Windows DOS box command line tool. The tool must be rebuilt using ph_.h and linked against ph_.lib. The below program will compile to a 2,560 byte executable with ph_.lib via the command "cl /O1 hello.c ph_.lib /link /entry:main" using the 2017 32-bit MSVC 15.4 (ver 19.11.25547) compiler: #include "ph_.h" void main(void) { printf("Hello World\n"); } Built with the MSVC 15.4 static stdlib (including stdio.h instead of ph_.h) the executable is 97,280 bytes. Any version of MSVC 6.0 or later should work, 32 or 64 bit. The following files are included: ph_.h C Header file ph_.c C source (for reference, not needed to use .lib) lib\ph_.lib 32-bit library lib\x64\ph_.lib 64-bit library ph_.txt This file Change Log ---------- Ver 1.0: Initial release. Only a handful of functions implemented. 9/1/19 Not really useful; basically a proof-of-concept. Ver 1.1 Added minimal wide char support; another proof-of-concept release. 9/13/19 New: wchar_t, wint_t, wmemcpy, wmemset, wcschr, scslen, _wfopen


Click here to download  ph_10.zip

Click here to download  ph_11.zip


Widget is loading comments...

You are visitor 75       Go to Home Page