Menu

Tree [fa1a9f] master /
 History

HTTPS access


File Date Author Commit
 .github 2022-08-14 Jordan Irwin Jordan Irwin [2a3a51] Use default CMake generator in release workflow
 cmake 2022-08-14 Jordan Irwin Jordan Irwin [8ea8db] Clean up & rename CMake toolchain files
 data 2022-08-11 Jordan Irwin Jordan Irwin [06b455] Export all icon sizes
 docs 2025-03-02 Jordan Irwin Jordan Irwin [933d59] Link to GitHub project page in site
 man 2022-08-12 Jordan Irwin Jordan Irwin [eaa254] Update version to 0.3.1 for release
 scripts 2022-08-16 Jordan Irwin Jordan Irwin [9cc257] Update manpage date with version script
 src 2025-03-09 Jordan Irwin Jordan Irwin [115433] Store correct data type in std::vector
 tests 2022-08-11 Jordan Irwin Jordan Irwin [d3a47a] Check that filename is exported correctly in test
 .gitignore 2025-03-09 Jordan Irwin Jordan Irwin [fa1a9f] Exclude any directory name starting with "build...
 BUGS.txt 2025-03-09 Jordan Irwin Jordan Irwin [86af34] Note that building with Clang is broken
 CHANGES.txt 2022-08-12 Jordan Irwin Jordan Irwin [eaa254] Update version to 0.3.1 for release
 CMakeLists.txt 2022-08-12 Jordan Irwin Jordan Irwin [6e7414] Use absolute path in CMake include
 LICENSE.txt 2022-07-21 Jordan Irwin Jordan Irwin [da31e9] Update copyright year
 README.md 2025-03-09 Jordan Irwin Jordan Irwin [86af34] Note that building with Clang is broken
 TODO.txt 2022-08-16 Jordan Irwin Jordan Irwin [9cc257] Update manpage date with version script
 configure 2022-08-06 Jordan Irwin Jordan Irwin [48c3d5] Fix executable bit for configure script
 icon_resource.rc 2019-09-11 Jordan Irwin Jordan Irwin [147ee6] Allow embedding icon resource on Win32...
 info.cfg 2022-08-12 Jordan Irwin Jordan Irwin [5bd5a8] Revert package revision

Read Me

Binary to Header

Description

Converter for binary files to C/C++ headers.

bin2header takes any file as an argument and converts its binary data into a source header file for use in C/C++
applications. The data is stored as a character array.

See manpage for usage information.

Licensing

MIT

Downloads

Building

To configure & build run cmake <path_to_source> && cmake --build ./.

Example of building from source root directory:

cmake ./ && cmake --build ./

Example of building from sub-directory in source root:

mkdir build
cd build
cmake ../ && cmake --build ./

After building is complete, files can be installed with:

cmake --install ./

To get a list of available CMake configuration options run cmake -LA <path_to_source>.

Notable CMake configuration options:

  • CMAKE_INSTALL_PREFIX: target directory where files are installed with cmake --install
  • STATIC: link to dependencies statically (default: OFF, native only)
  • EMBED_ICON: (Windows only) add icon resource to PE32 executable (default: OFF, native only)
  • NATIVE: build native executable (set to "OFF" to configure for Python script) (default: ON)

Example of building on Windows with MinGW:

mkdir build-win32 && cd build-win32
cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DSTATIC=ON -DEMBED_ICON=ON ../
cmake --build ./
cmake --install ./

'configure' Script

USAGE: ./configure [--help] [--type=TYPE] [--static]

Options:
--help        Show this help text
--type=TYPE   Set to "b" (default) for binary executable "s" for Python script
--static      Create statically linked executable (binary only)
  • To build native binary, run: ./configure && make
  • To build static native binary, run: ./configure --static && make
  • To build python version, run: ./configure --type=s && make

Acknowledgements

See: list of contributors

This project uses cxxopts.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.