Erreur à l'edition des liens lors de l'instanciation d'une classe
Bonjour,
Il y a beaucoup de fichiers dans mon code, les voila je pense que je dois les mettre pour expliquer mon problème :
Fichier skeleton.h
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#ifndef _SKELETON_H
#define _SKELETON_H
#include <glut.h>
class link;
class skeleton abstract{
public:
virtual void draw(); // Méthode d'affichage de la partie
void setvertices(GLfloat* vertices, int nbvertices);
void setlinks(link* links, int nblinks);
protected:
link* links; // Vecteur des liaisons vers les parties filles
int nblinks; // Nombre de liaisons
GLfloat color[3]; // La couleur de la partie
GLfloat* vertices; // Vecteur des points qui constituent l'objet
int nbvertices; // Nombre de points
};
#endif |
Fichier skeleton.cpp
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
#include "skeleton.h"
void skeleton::setvertices(GLfloat *vertices, int nbvertices){
this->vertices = vertices;
this->nbvertices = nbvertices;
}
void skeleton::setlinks(link *links, int nblinks){
this->links = links;
this->nblinks = nblinks;
} |
Fichier skeletonBody.h
Code:
1 2 3 4 5 6 7 8
|
class skeletonBody : public skeleton{
public:
void draw();
private:
GLfloat rotation[3]; // Angle de rotation de la partie
GLfloat translation[3]; // Vecteur translation de la partie par rapport au point (0,0) de l'environnement
}; |
Fichier skeletonBody.cpp
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#include "skeletonBody.h"
#include "link.h"
#include <glut.h>
void skeletonBody::draw(){
glLoadIdentity();
glTranslatef(translation[0], translation[1], translation[2]);
glRotatef(rotation[0], 1, 0, 0);
glRotatef(rotation[1], 0, 1, 0);
glRotatef(rotation[2], 0, 0, 1);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, vertices);
glBegin(GL_QUADS);
for(int i=0; i<nbvertices; i++){
glArrayElement(i);
}
glEnd();
for(int i=0; i<nblinks; i++){
glPushMatrix();
links[i].apply();
glPopMatrix();
}
} |
Fichier main.cpp
Code:
1 2 3 4 5 6 7 8 9
|
#include <glut.h>
#include "skeletonBody.h"
int main(){
GLfloat bustepoints[] = {0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0};
skeletonBody buste;
return 0;
} |
Et voici l'erreur que j'obtiens à l'édition des liens
symbole externe non résolu "public: virtual void __thiscall skeleton::draw(void)"
Je ne comprend pas pourquoi (je ne sais pas si c'est utile mais j'utilise visual c++ 2005)