Bonjour,
est ce que vous pouvez m'aider a créer une librairie dans mplabx svp, merci.
Version imprimable
Bonjour,
est ce que vous pouvez m'aider a créer une librairie dans mplabx svp, merci.
Bonjour,
Quand tu dit créer un bibliothèque tu entent créer une librairie de fonction (cas 1) ou une classe (cas 2).
Cas 1 : tu vas dans le dossier (windows/linux/mac/...) de ton code 'main.c' et tu créer manuellement un "nom_de_la_lib.h" et un "nom_de_la_lib.c". tu les ajoute dans MPLAB a ton projet et tu les édite. Dans le .h la config, les variables globales, et les prototype de fonction. Dans le .c les fonctions détailler
Cas 2 : il faut cocher un paramètre pour passer en C++ dans MPLAB (le compilateur changeras aussi), et donc créer comme précédemment deux fichier (un .h et un .cpp). Dans le .h tu défini ta classe, tes héritage (si il y en a), les variables globales, et les prototype de fonctions (sans oublier le constructeur) en fonction de leur statut (private, portected, public). Et dans ton .cpp tu écrit les fonction détailler et les interconnexions (si tu à des fonctions virtual par exemple).
avec cela tu devrais t'en sortir