I'm looking for a way to easily embed any external binary data in a C/C++ application compiled by GCC.
A good example of what I'd like to do is handling shader code - I can just keep it in source files like const char* shader = "source here";
but that's extremely impractical.
I'd like the compiler to do it for me: upon compilation (linking stage), read file "foo.bar" and link its content to my program, so that I'd be able to access the contents as binary data from the code.
Could be useful for small applications which I'd like to distribute as a single .exe file.
Does GCC support something like this?