I've went through a number of similar questions and almost got it to work, but not quite.
What I have is the standard Macro-Expansion-Stringification-method.
#define QUOTEME(M) #M #define DOQUOTE(M) QUOTEME(M) #define XCONCAT(X, Y) X##Y #define CONCAT(X, Y) XCONCAT(X, Y) Then I have a macro PREFIX like this:
#define SW_PREFIX XY2Ar- What I was trying to do was:
#define SW_FILE DOQUOTE(CONCAT(SW_PREFIX, update)) What this is supposed to output is: "XY2Ar-update" What it outputs on my GCC-type compiler is:
error: pasting "-" and "update" does not give a valid preprocessing token Now, I assume that he's replacing the macro correctly, but apparently doesn't want to append update to XY2Ar- because of the -.
I also tried:
#define SW_FILE DOQUOTE(SW_PREFIX.update) which, once again, almost does what I want, however it outputs XY2Ar-.update, which is not what I want either.
I'm out of ideas.