Salut à tous,
Voila ce que m'affiche le compilateur:
---------------------------------------
Linking...
CY_M2D_ElementBase.obj : error LNK2001: unresolved external symbol "public: __thiscall CY_Objet::CY_Objet(char const *)" (??0CY_Objet@@QAE@PBD@Z)
CY_M2D_ObjetAffichable.obj : error LNK2001: unresolved external symbol "public: __thiscall CY_Objet::CY_Objet(char const *)" (??0CY_Objet@@QAE@PBD@Z)
Test.obj : error LNK2001: unresolved external symbol "public: __thiscall CY_Moteur2D::CY_Moteur2D(void)" (??0CY_Moteur2D@@QAE@XZ)
Test.obj : error LNK2001: unresolved external symbol "public: __thiscall CY_Moteur2D::~CY_Moteur2D(void)" (??1CY_Moteur2D@@QAE@XZ)
CY_M2D_ObjetAffichable.obj : error LNK2001: unresolved external symbol "public: struct CY_M2D_Animation::Partie & __thiscall CY_Tableau<struct CY_M2D_Animation::Partie>::item(int)" (?item@?$CY_Tableau@UPartie@CY_M2D_Animation@@@@QAEAAUPartie@CY_M2D_
Animation@@H@Z)
Debug/CY_Moteur2D.exe : fatal error LNK1120: 4 unresolved externals
-----------------------------
Voila ce que j'ai inclu dans mon projet :
J'ai 4 fichiers .cpp :
CY_M2D_ElementBase.cpp (inclu : CY_M2D_ElementBase.h)
CY_M2D_ObjetAffichable.cpp (inclu : CY_M2D_ObjetAffichable.h)
CY_Moteur2D.cpp (inclu : CY_Moteur2D.h)
Test.cpp (inclu : CY_Moteur2D.h)
J'ai 3 fichier.h :
CY_M2D_ElementBase.h (inclu : CY_M2D_ElementBase.h et CY_Objet.h)
CY_M2D_ObjetAffichable.h (inclu : CY_M2D_ElementBase.h)
CY_Moteur2D.h (inclu : CY_Objet.h, CY_M2D_ElementBase.h et CY_M2D_ObjetAffichable.h)
Je précise que les CY_Objet et Test.cpp ne sont pas dans les mm répertoires que les autres.
J'ai bien implémenté les fonctions que le compilateur nomme dans leur .cpp correspondant avec une définition dans le .h correspondant :
CY_Objet défini dans CY_Objet.h et implémenté dans CY_Objet.cpp
CY_M2D_Animation défini dans CY_M2D_ObjetAffichable.h et implémenté dans CY_M2D_ObjetAffichable.cpp
CY_Moteur2D défini dans CY_Moteur2D.h et implémenté dans CY_Moteur2D.cpp
Quelqu'un a une explication ?
Cyril Q.
Programmeur débutant
Cyrik@wanadoo.fr