-
Notifications
You must be signed in to change notification settings - Fork 80
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
Macro Definition Conflict #104
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
here are errors:
In file included from TestLibflame.cpp:8:
/usr/include/c++/8/bits/sstream.tcc: In member function ‘virtual std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::int_type std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::overflow(std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::int_type)’:
/libflame-master/include/FLAME.h:840:21: error: expected unqualified-id before ‘(’ token
#define max( x, y ) ( (x) > (y) ? (x) : (y) )
^
/libflame-master/include/FLAME.h:837:21: error: expected unqualified-id before ‘(’ token
#define min( x, y ) ( (x) < (y) ? (x) : (y) )
^
/usr/include/c++/8/complex: In function ‘_Tp std::__complex_abs(const std::complex<_Tp>&)’:
/libflame-master/include/FLAME.h:840:21: error: expected unqualified-id before ‘(’ token
#define max( x, y ) ( (x) > (y) ? (x) : (y) )
^
The error messages you've encountered indicate a macro definition conflict within the code you're trying to compile. This conflict arises when the same identifier is defined with different meanings in different parts of the code or in different libraries. In your case, the max and min macros defined in the FLAME.h file from the libflame library are conflicting with the standard C++ library functions std::max and std::min.
How can this issue be resolved?
The text was updated successfully, but these errors were encountered: