diff --git a/ext/fox16/FXRuby.cpp b/ext/fox16/FXRuby.cpp
index 650418c142193ddef858e9db07058f2dac53d8e7..220e9760d830db90e9ebae4401be3d4a8e56c5b2 100755
--- a/ext/fox16/FXRuby.cpp
+++ b/ext/fox16/FXRuby.cpp
@@ -2016,7 +2016,11 @@ extern "C" void Init_ui(void);
 #define REQUIRE(fname) rb_funcall(rb_mKernel,rb_intern("require"),1,rb_str_new2((fname))) 
 #endif
 
-extern "C" void Init_fox16(void) {
+extern "C" void
+#if defined _WIN32
+__declspec(dllexport)
+#endif
+Init_fox16(void) {
   Init_core();
   Init_dc();
   Init_frames();