I've reported a bug for the these issues(not sure if there are multiple issues here). http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987 I tried the patch referred to in this thread, and my application links, but it crashes when I try to call one of the functions in the DLL. http://gcc.gnu.org/ml/java/2003-11/msg00078.html http://gcc.gnu.org/ml/java/2003-11/msg00078.html extern "C" { extern __declspec(dllimport) void runit() ; } typedef void (* runitType)(); int main(int argc, char* argv[]) { printf("Hello World!\n"); HMODULE h=LoadLibrary("send.dll"); runitType r=(runitType)GetProcAddress(h, "runit"); // this works r(); // this links, but crashes. There is no code at this address. runit(); return 0; }