I would like to include the content of some binary files in a statically linked C++ project - for context, these are payloads to be sent to vendor hardware devices.
Consequently I would like to end up at compile time with the content and length of files (whose paths are determined at compile time) in vector<uint8_t>
s and size_t
s, for instance.
What's the best way to do this ?
For the record, a fairly similar question was asked here, however, while there's always the option of using a script to convert each byte of the binary file to its numeric representation so I can later include it as part of a generated source code file, I was hoping there may be common support for some more natural way to do this.
Thanks.