나는 Code :: Blocks를 사용하여 Python (Mosquitto MQTT 포함) 스크립트를 다시 작성합니다.빌드 중 경고 메시지 -> 경고 : "bool"이 재정의되었습니다.
, 이것은 다음과 같은 경고가 발생합니다 : 시험 삼아 나는 Mosquitto 저장소에 사용할 수있는 다음 코드를 사용
||=== Build: Debug in test (compiler: GNU GCC Compiler) ===|
..\..\..\..\..\Program Files (x86)\mosquitto\devel\mosquitto.h|56|warning: "bool" redefined|
c:\mingw32-xy\bin\..\lib\gcc\mingw32\4.5.2\include\stdbool.h|33|note: this is the location of the previous definition|
obj\Debug\main.o||In function `on_connect':|
을 나는 주제에 파고 봤는데 그것을 할 수 있다고 생각 포함 경비원을 사용하여 해결할 수 있습니까? 몇 가지 테스트를 수행했지만 올바른 방법을 적용하는 방법을 모르겠습니다.
내가 도움이 :) 미리와 안부와
감사를 요구하기로 결정 숙련 된 C 프로그래머가 아닙니다 때문에.
편집 :
#ifndef _MOSQUITTO_H_
#define _MOSQUITTO_H_
#ifdef __cplusplus
extern "C" {
#endif
#if defined(WIN32) && !defined(WITH_BROKER)
# ifdef libmosquitto_EXPORTS
# define libmosq_EXPORT __declspec(dllexport)
# else
# define libmosq_EXPORT __declspec(dllimport)
# endif
#else
# define libmosq_EXPORT
#endif
#ifdef WIN32
# ifndef __cplusplus
# define bool char
# define true 1
# define false 0
# endif
#else
# ifndef __cplusplus
# include <stdbool.h>
# endif
#endif
을 만들 수있는 빠른 수정이됩니다 : 이것은 잘못 될 수있는 부분이다 https://bitbucket.org/oojah/mosquitto/src/4deedcb49ff50be94166701f21e5c79ff7667d5b/lib/mosquitto.h?at=default
: 나는 mosquitto.h 코드에 대한 링크를 추가했습니다 작업?