Skip to content

Macro Definition Conflict #104

Description

@MikaelCool

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions