我想做的是:
#define SAMPLE_DOCS_ROOT "C:\SampleDocuments\"
#if CLIENT != ""
#define SAMPLE_DOCS_CLIENT SAMPLE_DOCS_ROOT + "client\" + CLIENT
#ifexist SAMPLE_DOCS_CLIENT
#define SAMPLE_DOCS_PATH SAMPLE_DOCS_CLIENT + "\*"
#endif
#endif
即使存在SAMPLE_DOCS_CLIENT文件夹,也永远不会定义SAMPLE_DOCS_PATH。
似乎#ifexist
ISPP指令不接受绝对或相对目录路径,并且只接受文件路径。有没有办法在编译时检查目录的存在?