-
Notifications
You must be signed in to change notification settings - Fork 15
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
GCC 6 error: macro "min" passed 3 arguments, but takes just 2 #21
Comments
I ran into the same problem with GCC 6.1.0 on CentOS 6.9. Your temporary fix worked perfectly! |
This avoid conflicting definitions of max() and min(). Fixes kartverket#21 The patch was fetched from Gnonthgol@005e527 .
Tried compiling on rocky linux 9, gcc 11.4.1, The mentioned fix does not help, so I am not able to compile. |
Late to the party. My solution was to rename the macros and change the calls to min and max accordingly. I renamed the macros (and the respective calls) to MIN and MAX. This can be done in Linux (probably in Windows?) by running the following in the fyba base dir:
After that, it compiles with the latest gcc (there might be some assignement to NULL that is not supported, but in that case I initialized to 0 instead). |
Throws a bunch of warnings but compiles fine here (Debian 12.8, gcc 12.2) |
FYBA fails to compile with GCC 6:
As a temporary fix you can move
#include "stdafx.h"
below the other includes insrc/FYBA/FYLU.cpp
.My g++ and libstdc++-6-dev version is 6.3.0-12ubuntu2 on Ubuntu zesty.
The text was updated successfully, but these errors were encountered: