Comment corriger l'erreur fatale : tclap/CmdLine.h : Aucun fichier ou dossier de ce type
English
Français
Problème
Lors de la compilation d’un projet C++ qui dépend de TCLAP, vous pourriez rencontrer l’erreur suivante :
tclap-cmdline-error.txt
/home/uli/MyProject/device/device_cli.cpp:13:10: fatal error: tclap/CmdLine.h: No such file or directory
13 | #include <tclap/CmdLine.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/MyCLI.dir/build.make:79: CMakeFiles/MyCLI.dir/device/device_cli.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:349: CMakeFiles/MyCLI.dir/all] Error 2Solution
Vous devez installer libtclap-dev pour obtenir les fichiers d’en-tête nécessaires à TCLAP. Vous pouvez le faire avec la commande suivante :
install-tclap-dev.sh
sudo apt -y install libtclap-devCheck out similar posts by category:
C/C++
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow