Bonjour.
Dans ma dll, j'exporte la structure de la manière suivante :
DLLIMPORT :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 DLLIMPORT struct s_map { unsigned int n_tile; struct s_chipset *chipset; SDL_Surface *surf_chipset; unsigned int width; unsigned int height; unsigned int *data; unsigned int offsetX; unsigned int offsetY; FMUSIC_MODULE *bg_sound; };
Dans mon programme, j'importe la structure de la manière suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 #if BUILDING_DLL # define DLLIMPORT __declspec (dllexport) #else /* Not BUILDING_DLL */ # define DLLIMPORT __declspec (dllimport) #endif /* Not BUILDING_DLL */
Et je l'utilise ici :
Code : Sélectionner tout - Visualiser dans une fenêtre à part extern "C" __declspec(dllimport) struct s_map;
Probllème :
Code : Sélectionner tout - Visualiser dans une fenêtre à part struct s_map map;
Quelqu'un pour m'aider ?`s_map map' has incomplete type and cannot be defined
Partager