Embedding a File in an Executable, aka Hello World, Version 5967

15
I recently had the need to embed a file in an executable. Since I’m working at the command line with gcc, et al and not with a fancy RAD tool that makes it all happen magically it wasn’t immediately obvious to me how to make this happen. A bit of searching on the net found a hack to essentially cat it onto the end of the executable and then decipher where it was based on a bunch of information I didn’t want to know about. Seemed like there ought to be a better way…

Link: linuxjournal.com

Category:

  • Programming