diff -ur gimageview-0.2.14.orig/configure.in gimageview-0.2.14/configure.in
--- gimageview-0.2.14.orig/configure.in	2003-02-07 06:33:06.000000000 +0900
+++ gimageview-0.2.14/configure.in	2003-03-10 04:56:34.000000000 +0900
@@ -37,10 +37,45 @@
 
 
 dnl ******************************
+dnl Checks for host
+dnl ******************************
+AC_CANONICAL_HOST
+
+dnl Used for enabling the "-no-undefined" flag while generating DLLs
+dnl Copied from the official gtk+-2 configure.in
+AC_MSG_CHECKING([for some Win32 platform])
+case "$host" in
+  *-*-mingw*|*-*-cygwin*)
+    platform_win32=yes
+    ;;
+  *)
+    platform_win32=no
+    ;;
+esac
+AC_MSG_RESULT([$platform_win32])
+AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
+
+AC_MSG_CHECKING([for native Win32])
+case "$host" in
+  *-*-mingw*)
+    os_win32=yes
+    ;;
+  *)
+    os_win32=no
+    ;;
+esac
+AC_SUBST(LIBSTDCPP_LIBS)
+AC_MSG_RESULT([$os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
+
+
+dnl ******************************
 dnl libtool
 dnl ******************************
 AC_ENABLE_SHARED(yes)
 AC_ENABLE_STATIC(no)
+AC_LIBTOOL_WIN32_DLL
+AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
 
 
@@ -426,9 +461,13 @@
    [enable_spi="${enableval}"], [enable_spi=no])
 AM_CONDITIONAL(ENABLE_SPI, test "$enable_spi" = yes)
 if test "$enable_spi" = yes; then
-   AC_DEFINE(ENABLE_SPI)
-   LIBDLLLOADER="\$(top_builddir)/dllloader/libdllloader.la"
-   AC_SUBST(LIBDLLLOADER)
+  AC_DEFINE(ENABLE_SPI)
+  if test x"$platform_win32" = xyes; then
+  else
+    AM_CONDITIONAL(ENABLE_LIBDLLLOADER, test "$enable_spi" = yes)
+    LIBDLLLOADER="\$(top_builddir)/dllloader/libdllloader.la"
+    AC_SUBST(LIBDLLLOADER)
+  fi
 fi
 
 
diff -ur gimageview-0.2.14.orig/dllloader/Makefile.am gimageview-0.2.14/dllloader/Makefile.am
--- gimageview-0.2.14.orig/dllloader/Makefile.am	2002-05-20 07:17:33.000000000 +0900
+++ gimageview-0.2.14/dllloader/Makefile.am	2003-03-10 04:03:16.000000000 +0900
@@ -2,7 +2,7 @@
 # Makefile.am for enfle
 # $Id: Makefile.am,v 1.1 2002/05/19 22:17:33 makeinu Exp $
 
-if ENABLE_SPI
+if ENABLE_LIBDLLLOADER
 noinst_LTLIBRARIES = libdllloader.la
 endif
 
diff -ur gimageview-0.2.14.orig/plugins/archiver/Makefile.am gimageview-0.2.14/plugins/archiver/Makefile.am
--- gimageview-0.2.14.orig/plugins/archiver/Makefile.am	2002-11-05 21:38:21.000000000 +0900
+++ gimageview-0.2.14/plugins/archiver/Makefile.am	2003-03-10 03:24:40.000000000 +0900
@@ -1,3 +1,8 @@
+if PLATFORM_WIN32
+no_undefined = -no-undefined
+GIMV_LIBS = -L$(top_builddir)/src -Wl,-lgimv
+endif
+
 archiver_plugin_LTLIBRARIES = \
 	libarc_lha_ext.la \
 	libarc_rar_ext.la \
@@ -8,14 +13,18 @@
 
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src $(GTK_CFLAGS)
 
-libarc_lha_ext_la_LDFLAGS = -module -avoid-version
+libarc_lha_ext_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libarc_lha_ext_la_SOURCES = lha-ext.c lha-ext.h
+libarc_lha_ext_la_LIBADD = $(GTK_LIBS)
 
-libarc_rar_ext_la_LDFLAGS = -module -avoid-version
+libarc_rar_ext_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libarc_rar_ext_la_SOURCES = rar-ext.c rar-ext.h
+libarc_rar_ext_la_LIBADD = $(GTK_LIBS)
 
-libarc_tar_ext_la_LDFLAGS = -module -avoid-version
+libarc_tar_ext_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libarc_tar_ext_la_SOURCES = tar-ext.c tar-ext.h
+libarc_tar_ext_la_LIBADD = $(GTK_LIBS)
 
-libarc_zip_ext_la_LDFLAGS = -module -avoid-version
+libarc_zip_ext_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libarc_zip_ext_la_SOURCES = zip-ext.c zip-ext.h
+libarc_zip_ext_la_LIBADD = $(GTK_LIBS)
diff -ur gimageview-0.2.14.orig/plugins/image_saver/Makefile.am gimageview-0.2.14/plugins/image_saver/Makefile.am
--- gimageview-0.2.14.orig/plugins/image_saver/Makefile.am	2002-11-05 21:38:21.000000000 +0900
+++ gimageview-0.2.14/plugins/image_saver/Makefile.am	2003-03-10 03:27:50.000000000 +0900
@@ -1,3 +1,8 @@
+if PLATFORM_WIN32
+no_undefined = -no-undefined
+GIMV_LIBS = -L$(top_builddir)/src -Wl,-lgimv
+endif
+
 image_saver_plugin_LTLIBRARIES = \
 	libpng_saver.la \
 	libpnm_saver.la \
@@ -7,11 +12,14 @@
 
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src $(GTK_CFLAGS)
 
-libpng_saver_la_LDFLAGS = -module -avoid-version
+libpng_saver_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libpng_saver_la_SOURCES = png_saver.c
+libpng_saver_la_LIBADD = $(GTK_LIBS) $(PNG_LIBS)
 
-libpnm_saver_la_LDFLAGS = -module -avoid-version
+libpnm_saver_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libpnm_saver_la_SOURCES = pnm_saver.c
+libpnm_saver_la_LIBADD = $(GTK_LIBS)
 
-libxvpics_saver_la_LDFLAGS = -module -avoid-version
+libxvpics_saver_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libxvpics_saver_la_SOURCES = xvpics_saver.c
+libxvpics_saver_la_LIBADD = $(GTK_LIBS)
diff -ur gimageview-0.2.14.orig/plugins/thumbnail/Makefile.am gimageview-0.2.14/plugins/thumbnail/Makefile.am
--- gimageview-0.2.14.orig/plugins/thumbnail/Makefile.am	2002-11-05 21:38:21.000000000 +0900
+++ gimageview-0.2.14/plugins/thumbnail/Makefile.am	2003-03-10 03:29:38.000000000 +0900
@@ -1,3 +1,8 @@
+if PLATFORM_WIN32
+no_undefined = -no-undefined
+GIMV_LIBS = -L$(top_builddir)/src -Wl,-lgimv
+endif
+
 thumbnail_plugin_LTLIBRARIES =	\
 	libgimv_thumb.la	\
 	libnautilus_thumb.la	\
@@ -12,26 +17,35 @@
 
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src $(GTK_CFLAGS)
 
-libgimv_thumb_la_LDFLAGS = -module -avoid-version
+libgimv_thumb_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libgimv_thumb_la_SOURCES = gimv_thumb.c
+libgimv_thumb_la_LIBADD  = $(GTK_LIBS)
 
-libnautilus_thumb_la_LDFLAGS = -module -avoid-version
+libnautilus_thumb_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libnautilus_thumb_la_SOURCES = nautilus.c
+libnautilus_thumb_la_LIBADD  = $(GTK_LIBS)
 
-libnautilus_2_0_thumb_la_LDFLAGS = -module -avoid-version
+libnautilus_2_0_thumb_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libnautilus_2_0_thumb_la_SOURCES = nautilus-2.0.c
+libnautilus_2_0_thumb_la_LIBADD  = $(GTK_LIBS)
 
-libkonqueror_thumb_la_LDFLAGS = -module -avoid-version
+libkonqueror_thumb_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libkonqueror_thumb_la_SOURCES = konqueror.c
+libkonqueror_thumb_la_LIBADD  = $(GTK_LIBS)
 
-libkonq_old_thumb_la_LDFLAGS = -module -avoid-version
+libkonq_old_thumb_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libkonq_old_thumb_la_SOURCES = konqueror-old.c
+libkonq_old_thumb_la_LIBADD  = $(GTK_LIBS)
 
-libgqview_thumb_la_LDFLAGS = -module -avoid-version
+libgqview_thumb_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libgqview_thumb_la_SOURCES = gqview.c
+libgqview_thumb_la_LIBADD  = $(GTK_LIBS)
 
-libee_thumb_la_LDFLAGS = -module -avoid-version
+libee_thumb_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libee_thumb_la_SOURCES = ee.c
+libee_thumb_la_LIBADD  = $(GTK_LIBS)
 
-libxvpics_thumb_la_LDFLAGS = -module -avoid-version
+libxvpics_thumb_la_LDFLAGS = -module -avoid-version $(no_undefined) $(GIMV_LIBS)
 libxvpics_thumb_la_SOURCES = xvpics.c
+libxvpics_thumb_la_LIBADD  = $(GTK_LIBS)
+
diff -ur gimageview-0.2.14.orig/src/Makefile.am gimageview-0.2.14/src/Makefile.am
--- gimageview-0.2.14.orig/src/Makefile.am	2003-01-30 04:07:56.000000000 +0900
+++ gimageview-0.2.14/src/Makefile.am	2003-03-10 03:18:03.000000000 +0900
@@ -81,25 +81,41 @@
 	-DTHUMBNAIL_PLUGIN_DIR=\""$(THUMBNAIL_PLUGIN_DIR)"\"
 
 INCLUDES =					\
-	$(GTK_CFLAGS)				\
+	-I$(top_srcdir)				\
+	-I$(top_srcdir)/widget			\
+	-I$(top_srcdir)/plugins/image_loader	\
+	-I$(top_srcdir)/plugins/thumbnail_view  \
 	$(GIMV_IMAGELIB_CFLAGS)			\
 	$(BZLIB_CFLAGS)				\
 	$(PNG_CFLAGS)				\
 	$(GIMV_MOVIELIB_CFLAGS)			\
 	$(LIBRSVG_CFLAGS)			\
-	-I$(top_srcdir)				\
-	-I$(top_srcdir)/widget			\
-	-I$(top_srcdir)/plugins/image_loader	\
-	-I$(top_srcdir)/plugins/thumbnail_view
+	$(GTK_CFLAGS)
+
+if PLATFORM_WIN32
+gimv_implib_flags = \
+	-Wl,--export-all-symbols \
+	-Wl,--out-implib=libgimv.a
+
+gimv_exp = gimv.exp
+
+gimv.exp: gimv.def
+	dlltool --output-exp $@ --input-def gimv.def
+
+gimv.def: $(gimv_OBJECTS)
+	echo EXPORTS > gimv.def
+	nm $(gimv_OBJECTS) | grep ' T _' | sed 's/.* T _//' >> gimv.def
+endif
 
 gimv_LDFLAGS =			\
-	-export-dynamic
+	-export-dynamic		\
+	$(gimv_implib_flags)
 
 gimv_LDADD = 							\
+	$(gimv_exp)						\
 	$(INTLLIBS)						\
 	$(LIBICONV)						\
 	$(LIBCHARSET)						\
-	$(GTK_LIBS) 						\
 	$(GIMV_IMAGELIB_LIBS)					\
 	$(BZLIB_LIBS)						\
 	$(PNG_LIBS)						\
@@ -107,4 +123,7 @@
 	$(top_builddir)/plugins/image_loader/libimage_loader.la	\
 	$(top_builddir)/plugins/thumbnail_view/libthumbview.la	\
 	$(LIBEXIF)						\
-	$(LIBDLLLOADER)
+	$(LIBDLLLOADER)						\
+	$(GTK_LIBS) 
+
+
diff -ur gimageview-0.2.14.orig/src/plugin.c gimageview-0.2.14/src/plugin.c
--- gimageview-0.2.14.orig/src/plugin.c	2002-10-18 07:50:04.000000000 +0900
+++ gimageview-0.2.14/src/plugin.c	2003-03-10 03:45:08.000000000 +0900
@@ -253,6 +253,8 @@
 void
 plugin_search_directory (const gchar *dirname)
 {
+#define SO_EXT ("." G_MODULE_SUFFIX)
+#define SO_EXT_LEN (strlen(SO_EXT))
    GModule *module;
    gboolean success, regist = FALSE;
    PluginInfo *info;
@@ -272,7 +274,7 @@
       regist = FALSE;
 
       len = strlen (filename);
-      if (len < 3 || strcmp (filename + len - 3, ".so")) continue;
+      if (len < SO_EXT_LEN || strcmp (filename + len - SO_EXT_LEN, SO_EXT)) continue;
 
       /* load module */
       module =  g_module_open (filename, G_MODULE_BIND_LAZY);
diff -ur gimageview-0.2.14.orig/src/prefs_ui_plugin.c gimageview-0.2.14/src/prefs_ui_plugin.c
--- gimageview-0.2.14.orig/src/prefs_ui_plugin.c	2002-10-30 03:41:43.000000000 +0900
+++ gimageview-0.2.14/src/prefs_ui_plugin.c	2003-03-10 04:17:24.000000000 +0900
@@ -326,7 +326,11 @@
          GtkTreeIter iter;
 
          text[0] = spi->description;
+#ifdef G_PLATFORM_WIN32
+         text[1] = g_module_name(spi->pe);
+#else
          text[1] = spi->pe->filepath;
+#endif
 
          gtk_list_store_append (store, &iter);
          gtk_list_store_set (store, &iter,
diff -ur gimageview-0.2.14.orig/src/spi.c gimageview-0.2.14/src/spi.c
--- gimageview-0.2.14.orig/src/spi.c	2002-10-26 04:27:51.000000000 +0900
+++ gimageview-0.2.14/src/spi.c	2003-03-10 04:15:13.000000000 +0900
@@ -33,6 +33,23 @@
 #include "prefs.h"
 
 
+#ifdef G_PLATFORM_WIN32
+
+#define PE_image GModule
+
+static
+void* peimage_resolve(PE_image* image, const char* symbol_name)
+{
+   void* symbol;
+   if (g_module_symbol(image, symbol_name, &symbol))
+      return symbol;
+   else
+      return NULL;
+}
+
+#endif
+
+
 static void         spi_clear_search_dir_list    (void);
 static void         spi_create_search_dir_list   (void);
 static void         spi_search_directory         (const gchar *dirname);
diff -ur gimageview-0.2.14.orig/src/spi.h gimageview-0.2.14/src/spi.h
--- gimageview-0.2.14.orig/src/spi.h	2002-10-17 01:29:27.000000000 +0900
+++ gimageview-0.2.14/src/spi.h	2003-03-10 04:22:22.000000000 +0900
@@ -32,7 +32,17 @@
 
 #include <glib.h>
 
+#ifndef G_PLATFORM_WIN32
 #include "dllloader/pe_image.h"
+#else
+#include "gmodule.h"
+#define PE_image GModule
+#define peimage_create() (NULL)
+#define peimage_load(image, filename) \
+	(image = g_module_open(filename, G_MODULE_BIND_LAZY))
+#define peimage_destroy(image) (g_module_close(image))
+#endif
+
 #include "spi-private.h"
 
 
diff -ur gimageview-0.2.14.orig/widget/gimv_mplayer.c gimageview-0.2.14/widget/gimv_mplayer.c
--- gimageview-0.2.14.orig/widget/gimv_mplayer.c	2003-02-06 01:12:03.000000000 +0900
+++ gimageview-0.2.14/widget/gimv_mplayer.c	2003-03-08 10:59:58.000000000 +0900
@@ -1,3 +1,5 @@
+#if 0
+
 /*
  * GimvMPlayer -- a GTK+ mplayer's embedder
  * Copyright (C) 2002 Takuro Ashie <ashie@homa.ne.jp>
@@ -1679,3 +1681,5 @@
       }
    }
 }
+
+#endif
