RT,本人在写一个项目时用到了多头文件互相调用,通过一些宏定义解决了递归调用的问题。但是,现在出现了未定义调用的现象,报错如下:
In file included from modules/file-process.h:15,
from modules/commands.h:14,
from modules/apis.h:13,
from WCH.cpp:8:
modules/functions.h: In function 'void WCH_Init()':
modules/functions.h:55:16: error: 'WCH_GetUserName' was not declared in this scope; did you mean 'GetUserName'?
55 | UserName = WCH_GetUserName();
| ^~~~~~~~~~~~~~~
| GetUserName
modules/functions.h:60:5: error: 'WCH_SetWindowStatus' was not declared in this scope
60 | WCH_SetWindowStatus(true);
| ^~~~~~~~~~~~~~~~~~~
In file included from modules/apis.h:13,
from WCH.cpp:8:
modules/commands.h: In function 'void WCH_pi()':
modules/commands.h:110:5: error: 'WCH_SetWindowStatus' was not declared in this scope
110 | WCH_SetWindowStatus(false);
| ^~~~~~~~~~~~~~~~~~~
modules/commands.h: In function 'void WCH_anti_idle()':
modules/commands.h:134:9: error: 'WCH_SetWindowStatus' was not declared in this scope
134 | WCH_SetWindowStatus(false);
| ^~~~~~~~~~~~~~~~~~~
modules/commands.h:136:9: error: 'WCH_SetTrayStatus' was not declared in this scope
136 | WCH_SetTrayStatus(false);
| ^~~~~~~~~~~~~~~~~
modules/commands.h:138:9: error: 'WCH_SetWindowPos' was not declared in this scope; did you mean 'SetWindowPos'?
138 | WCH_SetWindowPos(false);
| ^~~~~~~~~~~~~~~~
| SetWindowPos
这几个头文件均在 https://github.com/class-tools/Web-Class-Helper 中 modules 下。
球球了,调一天了……