1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.57k stars 786 forks source link

can't compile code with arduino IDE 1.8.3 #56

Closed dakky closed 7 years ago

dakky commented 7 years ago

Simply cloned with submodules and tried to compile. Error:

/Users/robert/devzone/Arduino/OpenMQTTGateway/OpenMQTTGateway.ino: In function 'boolean reconnect()':
OpenMQTTGateway:82: error: invalid conversion from 'const char*' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
       client.publish(will_Topic,Gateway_AnnouncementMsg,will_Retain);
                                                                    ^
In file included from /Users/robert/devzone/Arduino/OpenMQTTGateway/OpenMQTTGateway.ino:42:0:
/Users/robert/devzone/Arduino/libraries/PubSubClient/PubSubClient.h:70:12: error:   initializing argument 2 of 'boolean PubSubClient::publish(char*, uint8_t*, unsigned int)' [-fpermissive]
    boolean publish(char *, uint8_t *, unsigned int);
            ^
OpenMQTTGateway:89: error: 'class PubSubClient' has no member named 'state'
       trc(String(client.state()));
                         ^
exit status 1
invalid conversion from 'const char*' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
dakky commented 7 years ago

nargls can be closed: this stupid arduinio IDE does not use the "local" libraries folder, but the "central" one. There are the wrong versions of libraries.

Maybe trying to get this to compile with platformIO would help: platformIO allows local libraries in the workspace.