如何在#include语句中连接字符串

时间:2018-02-04 22:43:21

标签: c++ macros string-concatenation stringification

如何在include语句中连接两个字符串?

我尝试了下面的代码 - 也没有## - 但两次都只有预处理器输出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"

0 个答案:

没有答案