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

min on other places of the library refers to macro-defined "min" on ardronelib #232

Open
Retorikal opened this issue May 25, 2022 · 0 comments

Comments

@Retorikal
Copy link

Retorikal commented May 25, 2022

I tried to compile this on noetic, and got this error somewhere down the line:

[ 96%] Generating EusLisp code from ardrone_autonomy/LedAnim.srv
In file included from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/string:40,
                 from /opt/ros/noetic/include/ros/platform.h:38,
                 from /opt/ros/noetic/include/ros/time.h:53,
                 from /opt/ros/noetic/include/ros/ros.h:38,
                 from /media/ganthet/VAULT/Projects/TA/workspace/src/ardrone_autonomy/include/ardrone_autonomy/ardrone_driver.h:31,
                 from /media/ganthet/VAULT/Projects/TA/workspace/src/ardrone_autonomy/include/ardrone_autonomy/ardrone_sdk.h:70,
                 from /media/ganthet/VAULT/Projects/TA/workspace/src/ardrone_autonomy/include/ardrone_autonomy/video.h:28,
                 from /media/ganthet/VAULT/Projects/TA/workspace/src/ardrone_autonomy/src/video.cpp:25:
/usr/include/c++/9/bits/stl_algobase.h:246:56: error: macro "min" passed 3 arguments, but takes just 2
  246 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |                                                        ^
In file included from /media/ganthet/VAULT/Projects/TA/workspace/devel/src/ardronelib/ARDroneLib/Soft/Common/navdata_common.h:16,
                 from /media/ganthet/VAULT/Projects/TA/workspace/devel/src/ardronelib/ARDroneLib/Soft/Common/ardrone_api.h:22,
                 from /media/ganthet/VAULT/Projects/TA/workspace/devel/src/ardronelib/ARDroneLib/Soft/Lib/ardrone_tool/ardrone_tool.h:4,
                 from /media/ganthet/VAULT/Projects/TA/workspace/src/ardrone_autonomy/include/ardrone_autonomy/ardrone_sdk.h:55,
                 from /media/ganthet/VAULT/Projects/TA/workspace/src/ardrone_autonomy/include/ardrone_autonomy/video.h:28,
                 from /media/ganthet/VAULT/Projects/TA/workspace/src/ardrone_autonomy/src/video.cpp:25:
/media/ganthet/VAULT/Projects/TA/workspace/devel/src/ardronelib/ARDroneLib/Soft/Lib/Maths/maths.h:31: note: macro "min" defined here
   31 | #define min(a, b) (a) < (b) ? (a) : (b)
      |

Is there anything I can do to prevent this? Looks like the min declaration leaked out or something.

@Retorikal Retorikal changed the title std::min refers to macro-defined "min" on ardronelib min on other places of the library refers to macro-defined "min" on ardronelib May 25, 2022
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

1 participant