我的VS2019今天早上更新,现在xlocbuf库中有18个编译器错误; xlocbuf内部标头(来自locale),我什至都不直接使用。
除了可能#include序列问题外,网上几乎没有其他内容;我更改了#include顺序,但没有发生错误。
VS2019 version 16.3.8
Severity Code Description Project File Line Suppression State
Error C2144 syntax error: 'unknown-type' should be preceded by '(' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 221
Error C2062 type 'unknown-type' unexpected C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 221
Error C2144 syntax error: 'unknown-type' should be preceded by '(' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 216
Error C2062 type 'unknown-type' unexpected C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 216
Error C2589 '=': illegal token on right side of '::' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 221
Error C2589 '=': illegal token on right side of '::' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 216
Error C2144 syntax error: 'unknown-type' should be preceded by '(' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 221
Error C2062 type 'unknown-type' unexpected C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 221
Error C2144 syntax error: 'unknown-type' should be preceded by '(' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 216
Error C2062 type 'unknown-type' unexpected C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 216
Error C2589 '=': illegal token on right side of '::' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 221
Error C2589 '=': illegal token on right side of '::' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 216
Error C2144 syntax error: 'unknown-type' should be preceded by '(' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 221
Error C2062 type 'unknown-type' unexpected C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 221
Error C2144 syntax error: 'unknown-type' should be preceded by '(' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 216
Error C2062 type 'unknown-type' unexpected C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 216
Error C2589 '=': illegal token on right side of '::' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 221
Error C2589 '=': illegal token on right side of '::' C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\xlocbuf 216
文件系统也有错误-我认为解决xlocbuf所存在的问题也将解决文件系统问题。我把这个问题集中在xlocbuf上,因为我什至不使用那个库。
没有下面的代码行就不会有错误,仅由#include <filesystem>
本身就会产生错误
#include <filesystem>
namespace fs = filesystem;
void read_batch( ) {
string path = "batch_in/";
for (const auto& entry : fs::directory_iterator(path) ) {
read(entry.path().string() );
cout << entry.path() << endl;
}
}
*警告:卢克史派克和他的兄弟*
在注释掉文件系统行并进行编译然后取消注释和编译时,它是否已编译?
首先,出现链接器错误。然后再次编译时,链接器错误消失了?
IDK。不要问不在乎现在可以了!