[Wemos D1 MINI LITE] Erreur de compilation


#1

Bonjour a tous,

J’ai ce message d’erreur :

In file included from C:\Users\etien\Documents\Arduino\libraries\Constellation\examples\StarterKits\ESP8266\ESP8266.pde:1:0:

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h: In instantiation of 'void Constellation<TNetworkClass>::checkIncomingMessage(int, int) [with TNetworkClass = WiFiClient]':

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:396:44:   required from 'void Constellation<TNetworkClass>::loop(int, int) [with TNetworkClass = WiFiClient]'

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:390:70:   required from 'void Constellation<TNetworkClass>::loop() [with TNetworkClass = WiFiClient]'

C:\Users\etien\Documents\Arduino\libraries\Constellation\examples\StarterKits\ESP8266\ESP8266.pde:44:22:   required from here

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:442:104: error: 'stricmp' was not declared in this scope

                                         stricmp (mc.isSagaCallback ? ctx.sagaId : ctx.messageKey, mc.id) == 0) {

                                                                                                        ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h: In instantiation of 'void Constellation<TNetworkClass>::checkStateObjectUpdate(int, int) [with TNetworkClass = WiFiClient]':

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:397:46:   required from 'void Constellation<TNetworkClass>::loop(int, int) [with TNetworkClass = WiFiClient]'

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:390:70:   required from 'void Constellation<TNetworkClass>::loop() [with TNetworkClass = WiFiClient]'

C:\Users\etien\Documents\Arduino\libraries\Constellation\examples\StarterKits\ESP8266\ESP8266.pde:44:22:   required from here

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:512:122: error: 'stricmp' was not declared in this scope

                                             (stricmp (type, subcription.type) == 0 || stricmp (WILDCARD, subcription.type) == 0)) {

                                                                                                                          ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:512:77: error: 'stricmp' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

                                             (stricmp (type, subcription.type) == 0 || stricmp (WILDCARD, subcription.type) == 0)) {

                                                                             ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:512:122: note: 'stricmp' declared here, later in the translation unit

                                             (stricmp (type, subcription.type) == 0 || stricmp (WILDCARD, subcription.type) == 0)) {

                                                                                                                          ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:511:122: error: 'stricmp' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

                                             (stricmp (name, subcription.name) == 0 || stricmp (WILDCARD, subcription.name) == 0) &&

                                                                                                                          ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:512:122: note: 'stricmp' declared here, later in the translation unit

                                             (stricmp (type, subcription.type) == 0 || stricmp (WILDCARD, subcription.type) == 0)) {

                                                                                                                          ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:511:77: error: 'stricmp' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

                                             (stricmp (name, subcription.name) == 0 || stricmp (WILDCARD, subcription.name) == 0) &&

                                                                             ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:512:122: note: 'stricmp' declared here, later in the translation unit

                                             (stricmp (type, subcription.type) == 0 || stricmp (WILDCARD, subcription.type) == 0)) {

                                                                                                                          ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:510:131: error: 'stricmp' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

                                             (stricmp (package, subcription.package) == 0 || stricmp (WILDCARD, subcription.package) == 0) &&

                                                                                                                                   ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:512:122: note: 'stricmp' declared here, later in the translation unit

                                             (stricmp (type, subcription.type) == 0 || stricmp (WILDCARD, subcription.type) == 0)) {

                                                                                                                          ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:510:83: error: 'stricmp' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

                                             (stricmp (package, subcription.package) == 0 || stricmp (WILDCARD, subcription.package) == 0) &&

                                                                                   ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:512:122: note: 'stricmp' declared here, later in the translation unit

                                             (stricmp (type, subcription.type) == 0 || stricmp (WILDCARD, subcription.type) == 0)) {

                                                                                                                          ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:509:137: error: 'stricmp' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

                                         if(    (stricmp (sentinel, subcription.sentinel) == 0 || stricmp (WILDCARD, subcription.sentinel) == 0) &&

                                                                                                                                         ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:512:122: note: 'stricmp' declared here, later in the translation unit

                                             (stricmp (type, subcription.type) == 0 || stricmp (WILDCARD, subcription.type) == 0)) {

                                                                                                                          ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:509:88: error: 'stricmp' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

                                         if(    (stricmp (sentinel, subcription.sentinel) == 0 || stricmp (WILDCARD, subcription.sentinel) == 0) &&

                                                                                        ^

C:\Users\etien\Documents\Arduino\libraries\Constellation/Constellation.h:512:122: note: 'stricmp' declared here, later in the translation unit

                                             (stricmp (type, subcription.type) == 0 || stricmp (WILDCARD, subcription.type) == 0)) {

                                                                                                                          ^

Utilisation de la bibliothèque Constellation version 2.1.16308 dans le dossier: C:\Users\etien\Documents\Arduino\libraries\Constellation 
Utilisation de la bibliothèque ArduinoJson version 5.12.0 dans le dossier: C:\Users\etien\Documents\Arduino\libraries\ArduinoJson 
Utilisation de la bibliothèque ESP8266WiFi version 1.0 dans le dossier: C:\Users\etien\Documents\Arduino\hardware\esp8266com\esp8266\libraries\ESP8266WiFi 
exit status 1

J’ai tenter plusieurs chose :

  • Changer de version Constellation.h

  • Changer de version ArduinoJson

  • Changer de PC/Mac

  • Changer de sketch pour prendre un starterkit
  • La je seche !
    Une idee ?


    #2

    Bonjour a tous !

    J’ai trouver une solution de contournement, sur stackoverflow je suis tomber sur un article, qui explique stricmp peut etre appeler dans plusieurs lib, j’ai specifier dans le fichier constellation.h la ligne :
    #define stricmp strcasecmp

    Depuis ca compile !


    #3

    Ça compilait, en réalité le workaround n’a fait que déplacer le problème de la build vers le runtime ce qui est pire.

    D’après mes recherches, le stricmp ne fait plus parti des fonctions dispo dans les libs C/C++

    Bref du coup ça commence à dépasser mon champ de compétences en c/c++ des que je tente un truc c’est pire :joy:

    Y a t’il un dev dans la salle ?


    #4

    Bonjour !

    Pour ceux qui ont encore ce problème, il suffit de travailler avec la version précédente des esp8266 (passer à la version 2.3.0)
    Outils -> Type de carte -> Gestionnaire de cartes -> esp8266 by ESP8266 Community et sélectionner la version 2.3.0 (il faut donc supprimer le #define stricmp strcasecmp ).

    Voilà :wink: