RoboticsClubAtUCDavis / micromouse

4 stars 3 forks source link

Arduino Compilation Broke #109

Closed blhough closed 7 years ago

blhough commented 7 years ago

using git bisect the issue seems to have been introduced here c0c6681c22186015861f1f3445f584a49769aea2

In file included from c:\program files (x86)\arduino\hardware\tools\arm\arm-none-eabi\include\c++\4.8.4\bits\stl_algo.h:60:0,

                 from c:\program files (x86)\arduino\hardware\tools\arm\arm-none-eabi\include\c++\4.8.4\algorithm:62,

                 from C:\Users\benhu\AppData\Local\Temp\arduino_build_230347\sketch\Maze.cpp:4:

c:\program files (x86)\arduino\hardware\tools\arm\arm-none-eabi\include\c++\4.8.4\bits\algorithmfwd.h:360:41: error: macro "max" passed 3 arguments, but takes just 2

     max(const _Tp&, const _Tp&, _Compare);

                                         ^

c:\program files (x86)\arduino\hardware\tools\arm\arm-none-eabi\include\c++\4.8.4\bits\algorithmfwd.h:371:41: error: macro "min" passed 3 arguments, but takes just 2

     min(const _Tp&, const _Tp&, _Compare);

                                         ^

c:\program files (x86)\arduino\hardware\tools\arm\arm-none-eabi\include\c++\4.8.4\bits\algorithmfwd.h:394:30: error: macro "min" requires 2 arguments, but only 1 given

     min(initializer_list<_Tp>);

                              ^
blhough commented 7 years ago

The culprit seems to be that Arduino.h defines min and max macros that are conflicting

blhough commented 7 years ago

adding #undef works