Précédent   Forum du club des développeurs et IT Pro > C et C++ > Outils pour C & C++ > Code::Blocks
Code::Blocks Forum d'entraide sur Code::Blocks. Avant de poster -> FAQ Code::Blocks
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 10/08/2012, 14h24   #1
drouchek
Invité de passage
 
Homme Maxime
Inscription : janvier 2011
Messages : 1
Détails du profil
Informations personnelles :
Nom : Homme Maxime
Localisation : Suisse

Informations forums :
Inscription : janvier 2011
Messages : 1
Points : 0
Points : 0
Par défaut Problème avec le compilateur

Bonjour, voila j'ai un problème avec le compilateur de Codeblocks.
J'ai fait un projet tout simple en suivant le tuto du Sdz sur le C++.
Je m'explique, si je n'inclue pas les .cpp sur Codeblocks(ce qu'il ne faut pas faire) alors il ne veux pas me compiler mon programme mais par contre g++ sous fedora le compile sans problème.
Voici les erreurs de Codeblocks :
Citation:
||=== partie2++, Debug ===|
obj/Debug/main.o||In function `main'
/home/maxime/Documents/partie2++/main.cpp|11|undefined reference to `Personnage:ersonnage()'|
/home/maxime/Documents/partie2++/main.cpp|11|undefined reference to `Personnage:ersonnage(std::string, int)'|
/home/maxime/Documents/partie2++/main.cpp|14|undefined reference to `Personnage::attaquer(Personnage&)'|
/home/maxime/Documents/partie2++/main.cpp|15|undefined reference to `Personnage::boirePotionDeVie(int)'|
/home/maxime/Documents/partie2++/main.cpp|16|undefined reference to `Personnage::attaquer(Personnage&)'|
/home/maxime/Documents/partie2++/main.cpp|17|undefined reference to `Personnage::attaquer(Personnage&)'|
/home/maxime/Documents/partie2++/main.cpp|18|undefined reference to `Personnage::changerArme(std::string, int)'|
/home/maxime/Documents/partie2++/main.cpp|19|undefined reference to `Personnage::attaquer(Personnage&)'|
/home/maxime/Documents/partie2++/main.cpp|23|undefined reference to `Personnage::afficherEtat() const'|
/home/maxime/Documents/partie2++/main.cpp|26|undefined reference to `Personnage::afficherEtat() const'|
/home/maxime/Documents/partie2++/main.cpp|29|undefined reference to `Personnage::~Personnage()'|
/home/maxime/Documents/partie2++/main.cpp|29|undefined reference to `Personnage::~Personnage()'|
/home/maxime/Documents/partie2++/main.cpp|11|undefined reference to `Personnage::~Personnage()'|
/home/maxime/Documents/partie2++/main.cpp|29|undefined reference to `Personnage::~Personnage()'|
/home/maxime/Documents/partie2++/main.cpp|29|undefined reference to `Personnage::~Personnage()'|
||=== Build finished: 15 errors, 0 warnings ===|
Après si j'inclue les .cpp, Codeblocks compile sans aucune erreur mais g++ me sort des tas d'erreurs.
J'ai joint le zip de mon projet au post, celui qui s'appelle g++ ne contient pas les .cpp et celui qui s'appelle codeblocks contient les include.

Donc voila, comment faire pour que le tout marche sous Codeblocks ?
Je pense que c'est un problème avec Codeblocks et qu'il ne compile pas tout mes fichiers.
Merci de votre aide !
Fichiers attachés
Type de fichier : zip partie2-g++.zip (282,0 Ko, 0 affichages)
Type de fichier : zip partie2-codeblocks.zip (287,7 Ko, 4 affichages)
drouchek est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 10h13.


 
 
 
 
Partenaires

Hébergement Web