# make
g++ -c -o PiGatewaySerial.o PiGatewaySerial.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME=\"/dev/ttyMySensorsGateway\" -D_TTY_GROUPNAME=\"tty\" -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -D__PI_BPLUS -I. -I/usr/local/include/RF24
In file included from /usr/include/c++/6.2.1/bits/char_traits.h:39:0,
from /usr/include/c++/6.2.1/ios:40,
from /usr/include/c++/6.2.1/ostream:38,
from /usr/include/c++/6.2.1/iostream:39,
from ./MyMessage.h:37,
from ./MySensor.h:18,
from ./MyGateway.h:16,
from PiGatewaySerial.cpp:36:
/usr/include/c++/6.2.1/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)
^
/usr/include/c++/6.2.1/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
In file included from ./MySensor.h:18:0,
from ./MyGateway.h:16,
from PiGatewaySerial.cpp:36:
/usr/include/c++/6.2.1/bits/stl_algobase.h:195:5: error: expected unqualified-id before 'const'
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/6.2.1/bits/stl_algobase.h:195:5: error: expected ')' before 'const'
/usr/include/c++/6.2.1/bits/stl_algobase.h:195:5: error: expected initializer before 'const'
/usr/include/c++/6.2.1/bits/stl_algobase.h:219:5: error: expected unqualified-id before 'const'
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/6.2.1/bits/stl_algobase.h:219:5: error: expected ')' before 'const'
/usr/include/c++/6.2.1/bits/stl_algobase.h:219:5: error: expected initializer before 'const'
In file included from /usr/include/c++/6.2.1/bits/char_traits.h:39:0,
from /usr/include/c++/6.2.1/ios:40,
from /usr/include/c++/6.2.1/ostream:38,
from /usr/include/c++/6.2.1/iostream:39,
from ./MyMessage.h:37,
from ./MySensor.h:18,
from ./MyGateway.h:16,
from PiGatewaySerial.cpp:36:
/usr/include/c++/6.2.1/bits/stl_algobase.h:243:5: error: 'std::min' declared as an 'inline' variable
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/6.2.1/bits/stl_algobase.h:246:7: error: expected primary-expression before 'if'
if (__comp(__b, __a))
^~
/usr/include/c++/6.2.1/bits/stl_algobase.h:246:7: error: expected '}' before 'if'
/usr/include/c++/6.2.1/bits/stl_algobase.h:246:7: error: expected ';' before 'if'
/usr/include/c++/6.2.1/bits/stl_algobase.h:248:7: error: expected unqualified-id before 'return'
return __a;
^~~~~~
/usr/include/c++/6.2.1/bits/stl_algobase.h:265:5: error: 'max' declared as an 'inline' variable
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/6.2.1/bits/stl_algobase.h:268:7: error: expected primary-expression before 'if'
if (__comp(__a, __b))
^~
/usr/include/c++/6.2.1/bits/stl_algobase.h:268:7: error: expected '}' before 'if'
/usr/include/c++/6.2.1/bits/stl_algobase.h:268:7: error: expected ';' before 'if'
/usr/include/c++/6.2.1/bits/stl_algobase.h:270:7: error: expected unqualified-id before 'return'
return __a;
^~~~~~
/usr/include/c++/6.2.1/bits/stl_algobase.h:271:5: error: expected declaration before '}' token
}
^
make: *** [Makefile:61: PiGatewaySerial.o] Error 1
I tried on a Rpi3, with archlinux, as root.
I succeeded to install the RF24 library though.
Is there something I could do?