iondbproject / iondb

IonDB, a key-value datastore for resource constrained systems.
BSD 3-Clause "New" or "Revised" License
587 stars 48 forks source link

Examples fail to compile on ESP-8266 #143

Open inetBrad opened 4 years ago

inetBrad commented 4 years ago

The examples fail to compile.

SimpleUsage - Generates an error on every insert() using Arduino IDE 1.8.10 and board set to NodeMCU 1.0 (ESP-12E Module). No error when setting the board to Arduino.

StringUsage:15:23: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
  dict->insert(3, "one");
BahramSoheili commented 4 years ago

you need to cast each string value in C++ by (ion_value_t) for example: dict->insert(3, (ion_value_t) "one");