How to concatenate strings in #include statement

How to combine two lines in an include statement?

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

#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"
+4
source share

Source: https://habr.com/ru/post/1693168/


All Articles