LOCODUINO

Aide
Forum de discussion
Dépôt GIT Locoduino
Flux RSS

mercredi 17 avril 2024

Visiteurs connectés : 40

Bibliothèque DCCpp

Encore un DCC++ ? Mais à quoi ça sert ?

. Par : Thierry

Pourquoi une bibliothèque ? Nous sommes devant le cas typique d’un projet dont une bonne partie du code doit pouvoir être ré-utilisée dans d’autres projets. C’est le but d’une bibliothèque, et c’est ce que j’ai décidé de faire après avoir vu tout le monde ici s’en servir, et l’avoir moi-même utilisé dans au moins deux projets différents : (...)

Retourner à l'article

Vous répondez à :

Bibliothèque DCCpp 4 octobre 2020 17:41, par Lionel

Bonjour,

Tout d’abord un grand merci pour votre fabuleux travail et cette bibliothèque.

Je viens de mettre à jour celle-ci depuis la version 1.3.7 vers la dernière en date (la 1.4.1) et depuis, j’ai les erreurs de compilation ci-dessous (je n’ai pas changé mon programme entre temps), et du coup, impossible de l’utiliser.

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotive.cpp:10:1 : error : ’Locomotive’ does not name a type
Locomotive::Locomotive(const char* inName, uint8_t inSpeedRegister, uint16_t inAddress, uint8_t inSpeedMax)

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotive.cpp:25:1 : error : ’Locomotive’ does not name a type
Locomotive::Locomotive(const char* inName, uint8_t inSpeedRegister, uint8_t inFunctionRegister, uint16_t inAddress, uint8_t inSpeedMax)

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:10:1 : error : ’Locomotive’ does not name a type
Locomotive* Locomotives::pFirstLocomotive = NULL ;

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:11:6 : error : ’Locomotives’ has not been declared
bool Locomotives::useFunctionRegister = false ;

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:13:1 : error : ’Locomotive’ does not name a type
Locomotive* Locomotives::get(uint16_t inAddress)

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:29:1 : error : ’Locomotive’ does not name a type
Locomotive* Locomotives::get(const char* inName)

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:45:6 : error : ’Locomotives’ has not been declared
void Locomotives::remove(uint16_t inAddress)

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:49:6 : error : ’Locomotives’ has not been declared
void Locomotives::remove(const char* inName)

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp : In function ’void remove(const char*)’ :
/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:49:6 : error : ambiguating new declaration of ’void remove(const char*)’
In file included from /home/lmollard/ArduinoIDE/hardware/arduino/avr/cores/arduino/Print.h:24:0,
from /home/lmollard/ArduinoIDE/hardware/arduino/avr/cores/arduino/Stream.h:26,
from /home/lmollard/ArduinoIDE/hardware/arduino/avr/cores/arduino/HardwareSerial.h:29,
from /home/lmollard/ArduinoIDE/hardware/arduino/avr/cores/arduino/Arduino.h:233,
from /home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:7 :
/home/lmollard/ArduinoIDE/hardware/tools/avr/avr/include/stdio.h:960:12 : note : old declaration ’int remove(const char*)’
extern int remove(const char *pathname) ;

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp : At global scope :
/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:53:5 : error : ’Locomotives’ has not been declared
int Locomotives::count()

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp : In function ’int count()’ :
/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:57:2 : error : ’Locomotive’ was not declared in this scope
Locomotive* pCurr = pFirstLocomotive ;

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:57:14 : error : ’pCurr’ was not declared in this scope
Locomotive* pCurr = pFirstLocomotive ;

/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:57:14 : note : suggested alternative : ’perror’
Locomotive* pCurr = pFirstLocomotive ;

perror
/home/lmollard/Arduino/libraries/DCCpp/src/Locomotives/Locomotives.cpp:57:22 : error : ’pFirstLocomotive’ was not declared in this scope
Locomotive* pCurr = pFirstLocomotive ;

Auriez-vous une piste à me donner pour faire de nouveau fonctionner mon programme ?

Par avance, un grand merci pour votre aide.

Bonne journée,
Lionel

Qui êtes-vous ?
Votre message

Pour créer des paragraphes, laissez simplement des lignes vides.

Lien hypertexte

(Si votre message se réfère à un article publié sur le Web, ou à une page fournissant plus d’informations, vous pouvez indiquer ci-après le titre de la page et son adresse.)

98 Messages

Rubrique Bibliothèques

Bibliothèque Accessories (1)

Bibliothèque Accessories (2)

Un décodeur d’accessoires universel (1)

Un décodeur d’accessoires universel (2)

Un décodeur d’accessoires universel (3)

Bibliothèque LcdUi (1)

Bibliothèque LcdUi (2)

La bibliothèque Servo

Bibliothèque SoftWare Serial

Bibliothèque Serial

Bibliothèque EEPROM

Bibliothèque Wire : I2C

Bibliothèque LCD

La bibliothèque ScheduleTable

Bibliothèque MemoryUsage

Bibliothèque EEPROMextent

La bibliothèque SlowMotionServo

Bibliothèque Commanders

Bibliothèque DCCpp

Bibliothèque DcDccNanoController

La bibliothèque ACAN (1)

La bibliothèque ACAN (2)

Bibliothèque LightEffect

Les derniers articles

Bibliothèque LightEffect


Christian

La bibliothèque ACAN (2)


Jean-Luc

La bibliothèque ACAN (1)


Jean-Luc

La bibliothèque SlowMotionServo


Jean-Luc

Bibliothèque DCCpp


Thierry

Bibliothèque DcDccNanoController


Thierry

Bibliothèque LcdUi (2)


Thierry

Bibliothèque LcdUi (1)


Thierry

Bibliothèque Accessories (2)


Thierry

Bibliothèque Accessories (1)


Thierry

Les articles les plus lus

Bibliothèque Wire : I2C

Bibliothèque DcDccNanoController

Bibliothèque DCCpp

La bibliothèque Servo

Bibliothèque SoftWare Serial

Un décodeur d’accessoires universel (1)

Bibliothèque Commanders

La bibliothèque ACAN (1)

Bibliothèque LCD

Bibliothèque EEPROM