My solution is [1]. It generates a C file with a specific array name passed in through the command-line. It also has a few other niceties that I need.
It works on Windows, Mac OSX, Linux, and the BSD's, no matter the compiler or linker.
I use it to generate the arrays for the help texts ([2] and [3]), as well as two math libraries ([4] and [5]).
People are welcome to adopt and adapt it. Just follow the license, as per usual. I've even adapted to my other software. [6]
[1]: https://git.yzena.com/gavin/bc/src/branch/master/gen/strgen....
[2]: https://git.yzena.com/gavin/bc/src/branch/master/gen/bc_help...
[3]: https://git.yzena.com/gavin/bc/src/branch/master/gen/dc_help...
[4]: https://git.yzena.com/gavin/bc/src/branch/master/gen/lib.bc
[5]: https://git.yzena.com/gavin/bc/src/branch/master/gen/lib2.bc
[6]: https://git.yzena.com/Yzena/Yc/src/branch/master/tests/strge...