September 8, 2018, 6:47am
Hello guys just wondering what is the reason of the issue, I am on a mac
/.platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algobase.h:243:56: error: macro"min" passed 3 arguments, but takes just 2
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
Seems like a macro and a function definition are colliding. Which
min do you want to use?
std::min? Then write
std::min and maybe
#undef min or
#undef MIN at the top.
September 8, 2018, 3:52pm
Yup, totally right, I had to modify the xtensa file for the project, looks like it fixed it
Actually it should be sufficient to just
#undef min after the header that does the
#define min(..) in your main CPP / INO file. And
using namespace std; should be avoided in this case if you have it, because
min can then become ambigious.
September 9, 2018, 4:10pm
I had no code with min or max declared, my guess is that, it was messing with internal/system headers