min/max defines collide with C++ on MSVC
nazar-pc opened this issue · 3 comments
These defines:
usrsctp/usrsctplib/user_environment.h
Lines 65 to 68 in 1ade45c
Cause problems with MSVC compiler when included in C++ project that uses std::min/max
, because min
and max
are replaced with define contents.
Here is an example pipeline with such errors: https://github.com/nazar-pc/mediasoup/runs/3152529859?check_suite_focus=true
Would be nice to not define such a generic things in C, the issue is essentially similar to #600
Why don't you compile the library with a c compiler and link your project against it? This stuff is internal to the library...
I guess it is included anyway due to being in a header file or maybe MSVC it insane that way, not sure yet.
Hm, even though it is defined in usrsctp, I suspect it might not be the reason I'm getting that error, must be just because other dependency doesn't define NOMINMAX
for MSVC in meson.build
, sorry for the false report.