Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS2022 编译报错 #71

Open
tiantianaixuexi opened this issue Apr 7, 2023 · 1 comment
Open

VS2022 编译报错 #71

tiantianaixuexi opened this issue Apr 7, 2023 · 1 comment

Comments

@tiantianaixuexi
Copy link

1>ShineLibhv.cpp
1>G:\C++Project\ShineLibhv\third\include\fmtlog\fmtlog.h(595,32): error C2589: “(”:“::”右边的非法标记
1>G:\C++Project\ShineLibhv\third\include\fmtlog\fmtlog.h(598,1): message : 查看对正在编译的 类 模板 实例化“std::vector<fmt::v9::basic_format_argfmt::v9::format_context,std::allocator<fmt::v9::basic_format_argfmt::v9::format_context>>”的引用
1>G:\C++Project\ShineLibhv\third\include\fmtlog\fmtlog.h(721,2): message : 查看对正在编译的 类 模板 实例化“fmtlogT<__>”的引用
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vector(497,5): fatal error C1903: 无法从以前的错误中恢复;正在停止编译

感觉是和 minwindef.h 的 max 宏冲突了

image

@linuxaged
Copy link

尝试增加宏定义:NOMINMAX
target_compile_definitions(${PROJECT_NAME} PRIVATE -DNOMINMAX)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants