@thomasorus Sure, you could fopen() and fread() the svg into a buffer and use it where you need it.
What you have there doesn't make sense though -- keep in mind that #defines are literally just a text search-and-replace that occurs before the compiler even runs. You would just be replacing occurences of the text "LOGO" in your C source with that fopen() call.
@thomasorus Unfortunately, you can't do that exactly but, you might be able to move your templates over into separate include files or as separate C files (containing the string as global variables).
@leimon Having them into another file as global variables could be a good solution yes! Thanks for suggesting it, do you have any demo of this somewhere?
@thomasorus Umm, if you'd like I could whip up a little example for you later after my kiddos are in bed.
@thomasorus This is a bit of a crappy example but, here I've essentially embeded a sample "template" string within a second C source file and then just make the other source file aware of it by using an extern. Hopefully this will give you some inspiration.
FYI: This pastebin site only keeps things up for about 24 hours. So hopefully this reaches you in time.
@thomasorus hmm. why preprocessor directives? could you not just define the svgs as strings in header files and include them? just off the top of my head...
Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.