We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
FYBA fails to compile with GCC 6:
make[2]: Entering directory '/home/user/Downloads/fyba/src/FYBA' /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. --pedantic -Wno-long-long -Wall -O2 -D_FILE_OFFSET_BITS=64 -DUNIX -DLINUX -fPIC -Wno-write-strings -I../GM -I../UT -g -O2 -MT FYLU.lo -MD -MP -MF .deps/FYLU.Tpo -c -o FYLU.lo FYLU.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. --pedantic -Wno-long-long -Wall -O2 -D_FILE_OFFSET_BITS=64 -DUNIX -DLINUX -fPIC -Wno-write-strings -I../GM -I../UT -g -O2 -MT FYLU.lo -MD -MP -MF .deps/FYLU.Tpo -c FYLU.cpp -fPIC -DPIC -o .libs/FYLU.o In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/string:40, from /usr/include/c++/6/bits/locale_classes.h:40, from /usr/include/c++/6/locale:39, from FYLU.cpp:11: /usr/include/c++/6/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/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 stdafx.h:12:0, from FYLU.cpp:7: /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected unqualified-id before ‘const’ min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected ‘)’ before ‘const’ /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected ‘)’ before ‘const’ /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected ‘)’ before ‘const’ /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected initializer before ‘const’ /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected unqualified-id before ‘const’ max(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected ‘)’ before ‘const’ /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected ‘)’ before ‘const’ /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected ‘)’ before ‘const’ /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected initializer before ‘const’ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/string:40, from /usr/include/c++/6/bits/locale_classes.h:40, from /usr/include/c++/6/locale:39, from FYLU.cpp:11: /usr/include/c++/6/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/bits/stl_algobase.h:246:7: error: expected primary-expression before ‘if’ if (__comp(__b, __a)) ^~ /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘}’ before ‘if’ /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘;’ before ‘if’ /usr/include/c++/6/bits/stl_algobase.h:248:7: error: expected unqualified-id before ‘return’ return __a; ^~~~~~ /usr/include/c++/6/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/bits/stl_algobase.h:268:7: error: expected primary-expression before ‘if’ if (__comp(__a, __b)) ^~ /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘}’ before ‘if’ /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘;’ before ‘if’ /usr/include/c++/6/bits/stl_algobase.h:270:7: error: expected unqualified-id before ‘return’ return __a; ^~~~~~ /usr/include/c++/6/bits/stl_algobase.h:271:5: error: expected declaration before ‘}’ token } ^ Makefile:472: recipe for target 'FYLU.lo' failed make[2]: *** [FYLU.lo] Error 1 make[2]: Leaving directory '/home/user/Downloads/fyba/src/FYBA' Makefile:457: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/user/Downloads/fyba' Makefile:366: recipe for target 'all' failed make: *** [all] Error 2
As a temporary fix you can move #include "stdafx.h" below the other includes in src/FYBA/FYLU.cpp.
#include "stdafx.h"
src/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:
I ran into the same problem with GCC 6.1.0 on CentOS 6.9. Your temporary fix worked perfectly!
Sorry, something went wrong.
Move "stdafx.h" include below system headers.
072cf1c
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.
Successfully merging a pull request may close this issue.
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: