Probleme de typedef struct
Bonjour a tous,
Voila j'ai un problème avec une appli que je doit porter sous linux, compilation gcc.
Mon problème est le suivant :
J'ai un fichier header (.h) dans lequel sont défini des structures nécessaires à la bonne exécution du prog. Voici le code :
Code:
1 2 3 4 5 6 7 8
| struct s_pixmap
{
Pixmap data;
int x_start, y_start;
int width, height;
};
typedef struct s_pixmap *t_pixmap_ptr; |
GCC à la compil me donne cette erreur :
redefinition of ‘struct s_pixmap’
Voila moi j'ai essayer de faire ca :
Code:
1 2 3 4 5 6 7 8
| typedef struct
{
Pixmap data;
int x_start, y_start;
int width, height;
}s_pixmap;
struct s_pixmap *t_pixmap_ptr; |
Mais cela ne fonctionne pas non plus.
Si quelqu'un pourrai me donner un petit coup de main?
Merci d'avance.