From: Vincent T. <vt...@un...> - 2008-03-02 20:18:14
|
Hey, I have defines a struct like that: typedef struct { void (*fct) (void); } Toto; declared the function my_fct() like that: __declspec(dllimport) void my_fct (void); and used it like that: static const Toto toto = { my_fct }; Then gcc (3.4.5) returns the following error message: evas_image_main.c:43: error: initializer element is not constant evas_image_main.c:43: error: (near initialization for `toto.fct') I don't know very well what dllimport does, so i have no idea of what the problem can be. If I remove __declspec(dllimport), it works, of course. Does someone see the problem (and its solution) ? thank you Vincent Torri |