Bonjour.

Dans ma dll, j'exporte la structure de la manière suivante :
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;
};
DLLIMPORT :
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 */
Dans mon programme, j'importe la structure de la manière suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
extern "C" __declspec(dllimport) struct s_map;
Et je l'utilise ici :
Probllème :
`s_map map' has incomplete type and cannot be defined
Quelqu'un pour m'aider ?