how to concatenate strings in #include statement

57 Views Asked by At

How do I concatenate two strings in an include statement?

I tried the code below - and also without ## - but both times, only the BASE_DIR part was output by the preprocessor.

#define BASE_DIR    "../Source/micropython/" /* Assume this file is in ATI_micropython/Headers */

#include BASE_DIR##"py/parse.h"

#include BASE_DIR ## "py/gc.h"
#include BASE_DIR ## "py/mpstate.h"
0

There are 0 best solutions below