Some frameworks (Qt, Windows, Gtk...) offer functionality to add resources to your binaries. I wonder if it would be possible to achieve this without the framework, since all that is really needed is
How can this be achieved with the gcc toolchain?
You could do this:
objcopy --input binary \
--output elf32-i386 \
--binary-architecture i386 my_file.xml myfile.o
This produces an object file that you can link into your executable. This file will contain these symbols that you'll have to declare in your C code to be able to use them
00000550 D _binary_my_file_xml_end
00000550 A _binary_my_file_xml_size
00000000 D _binary_my_file_xml_start