포함 할 라이브러리 중 두 개는 각각의 .h 파일에서 동일한 매크로 정의를 공유합니다. 동일한 정의의 다중 정의 #define 라이브러리의 매크로 정의
#define MAX <some value> //first definition of MAX in a file
#define MAX <some other value> //second definition of MAX in a *different* file
및 편집에
나는.../httpd.h:43:1: warning: "MAX" redefined
나는 이러한 헤더의 각을 확인했습니다
.../opencv2/core/types_c.h:272:1: warning: this is the location of the previous definition
를 얻을, 그들은의 #include 가드를 가지고있다.
이 오류를 수정하는 가장 좋은 방법은 무엇입니까 (오류가 발생하지 않고 다른 -W 플래그로 경고를 표시하지 않음)?
세 번째 옵션은 소스를 편집하는 것입니다 (너무 오래 걸리지 않아야 함). 또한 bugzilla/mailing list/support에서 불만을 제기합니다. – AoeAoe