C++ cannot determine #include translation of...: malformed string ‘ERROR‘ unrecognized...

今天遇到一个神奇的问题。
打开好几天没有动过的项目,编译,突然报错了!
C++ cannot determine #include translation of...: malformed string ‘ERROR‘ unrecognized..._第1张图片

[Error] cannot determine #include translation of…: malformed string ‘ERROR’
unrecognized…

一脸懵,而且只有这几个双引号的include报错,用尖括号的不报错。我改成 “./ss_string.h” ,仍然报错。改成 “.\ss_string.h” ,仍然报错。改成绝对路径,提示找不到。
我去百度搜,啥也没有。Stackoverflow也么有。
当时人就傻了,想想,最近有什么改动,想起来了,好像写过一个测试新版cpp不定参数的程序,打开编译选项,发现C++ cannot determine #include translation of...: malformed string ‘ERROR‘ unrecognized..._第2张图片
我开的是支持导入模块的C++23.将下面的
-fmodules-ts选项删除,问题解决。

原因猜测:开启模块后,编译器对双引号的include是否要弄成模块而感到十分困惑;字符串非良构啥的,瞎猜的。反正就是有这么一个坑。挺离谱的。

你可能感兴趣的:(c++,Redpanda,Cpp,C++模块,C++23,cpp,IDE,编译)