#ifndef WORKAROUND # define INITIAL(v) (v) # define ASSIGN(f,v) #else # define INITIAL(v) (0) # define ASSIGN(f,v) do{ f = v; }while(0) #endif typedef void (*function)(); struct foo { function get; }; __declspec(dllimport) void f1(); struct foo f = { INITIAL(f1) }; void init() { ASSIGN(f.get, f1); }