A L'AIDE !! Référence Indéfinie vers....

cs_samy79 Messages postés 4 Date d'inscription samedi 18 octobre 2003 Statut Membre Dernière intervention 14 février 2010 - 5 juin 2006 à 17:56
luhtor Messages postés 2023 Date d'inscription mardi 24 septembre 2002 Statut Membre Dernière intervention 28 juillet 2008 - 5 juin 2006 à 18:50
Bonjour. Lorsque je compile mon programme j'obtien cette erreur, et je n'arrive


pas a y remedier...


main.o(.text+0x26c): In function `main':


: référence indéfinie vers « action::app(int&, int&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)»


collect2: ld a retourné 1 code d'état d'exécution


make: *** [tp2] Erreur 1


voici mon make file


INC_XERCES=/opt/xerces/include


LIB_XERCES=/opt/xerces/lib


INC_PROG2=/RAID/DEPARTEMENTS/INFOS/prog/prog2/include


LIB_PROG2=/RAID/DEPARTEMENTS/INFOS/prog/prog2/lib


tp2 : affichage.o main.o Forme.o keywait.o prog.o comp.o action.o


g++ affichage.o main.o Forme.o keywait.o prog.o comp.o action.o\


${LIB_PROG2}/*o \


-L ${LIB_XERCES} -lxerces-c -lpthread \


-o tp2





main.o : main.cpp affichage.hpp comp.o action.o


g++ -Wall -I${INC_XERCES} -I${INC_PROG2} -c main.cpp


affichage.o : affichage.cpp affichage.hpp Forme.o keywait.o


g++ -Wall -I${INC_XERCES} -I${INC_PROG2} -c affichage.cpp


Forme.o : Forme.cpp Forme.hpp


g++ -Wall -I${INC_XERCES} -I${INC_PROG2} -c Forme.cpp


keywait.o : keywait.cpp keywait.hpp prog.o


g++ -Wall -I${INC_XERCES} -I${INC_PROG2} -c keywait.cpp


prog.o : prog.cpp prog.hpp


g++ -Wall -I${INC_XERCES} -I${INC_PROG2} -c prog.cpp


comp.o : comp.cpp comp.hpp


g++ -Wall -I${INC_XERCES} -I${INC_PROG2} -c comp.cpp


action.o : action.cpp action.hpp


g++ -Wall -I${INC_XERCES} -I${INC_PROG2} -c action.cpp





propre :


rm *.o


Et la fonction concernee:


L'appel :


action e;


e.app(act,cond,txt);


Le hpp


class action


{


public:


void app(int &, int &, std::string &);


};


le cpp


void app(int & act, int & cond, std::string & txt)


{


....


}


QUELQU'UN PEUT-IL M'AIDER ???? JE DESESPERE !!!!


Merci


 










[javascript:Insert_Emoticon('./imgs2/smile_sad.gif');

]


/P>

1 réponse

luhtor Messages postés 2023 Date d'inscription mardi 24 septembre 2002 Statut Membre Dernière intervention 28 juillet 2008 6
5 juin 2006 à 18:50
Dans le cpp, faut:


void action::app(int & act, int & cond, std::string & txt)


{


....


}
0
Rejoignez-nous