preprocessor/9650: string literal contactenation doesn't work with #include
Neil Booth
neil@daikokuya.co.uk
Mon Feb 10 23:02:00 GMT 2003
frey waid wrote:-
> that's what i was doing before. so i had this:
>
> #include COMP_INC(comp,file)
>
> #define COMP_INC(comp,file) #comp "/include/" #file
>
> do you have another method in mind?
Sure 8-)
#include COMP_INC (comp, file)
#define COMP_INC(comp, file) COMP (comp, file)
#define COMP(prefix, suffix) str(comp/include/file)
#define str(x) #x
Not tested, but you get the idea.
Neil.
More information about the Gcc-bugs
mailing list