diff --git a/getarg.h b/getarg.h
index 4a4559d..0e529a4 100644
--- a/getarg.h
+++ b/getarg.h
@@ -30,7 +30,7 @@ void GAPrintHowTo(char *CtrlStr);
 /******************************************************************************
  From qprintf.c
 ******************************************************************************/
-extern bool GifNoisyPrint;
+XPORT bool GifNoisyPrint;
 extern void GifQprintf(char *Format, ...);
 extern void PrintGifError(int ErrorCode);
 
diff --git a/gif_font.c b/gif_font.c
index d90783c..fd3c7e6 100644
--- a/gif_font.c
+++ b/gif_font.c
@@ -11,6 +11,10 @@ SPDX-License-Identifier: MIT
 
 #include "gif_lib.h"
 
+#ifdef _WIN32
+    #define strtok_r strtok_s
+#endif
+
 /*****************************************************************************
  Ascii 8 by 8 regular font - only first 128 characters are supported.
 *****************************************************************************/
diff --git a/gif_hash.h b/gif_hash.h
index 6a1b585..1c5dbc5 100644
--- a/gif_hash.h
+++ b/gif_hash.h
@@ -9,7 +9,9 @@ SPDX-License-Identifier: MIT
 #ifndef _GIF_HASH_H_
 #define _GIF_HASH_H_
 
+#ifndef	_WIN32
 #include <unistd.h>
+#endif
 #include <stdint.h>
 
 #define HT_SIZE			8192	   /* 12bits = 4096 or twice as big! */
diff --git a/gif_lib.h b/gif_lib.h
index ebdbd3c..44c4832 100644
--- a/gif_lib.h
+++ b/gif_lib.h
@@ -23,6 +23,13 @@ extern "C" {
 #include <stddef.h>
 #include <stdbool.h>
 
+#ifdef GIFLIB_EXPORTS
+  #define XPORT __declspec(dllexport)
+#else
+  #define XPORT __declspec(dllimport)
+#endif
+
+
 #define GIF_STAMP "GIFVER"          /* First chars in file - GIF stamp.  */
 #define GIF_STAMP_LEN sizeof(GIF_STAMP) - 1
 #define GIF_VERSION_POS 3           /* Version first character in stamp. */
@@ -276,7 +283,7 @@ int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB,
 
 #define GIF_FONT_WIDTH  8
 #define GIF_FONT_HEIGHT 8
-extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH];
+extern const unsigned char XPORT GifAsciiTable8x8[][GIF_FONT_WIDTH];
 
 extern void GifDrawText8x8(SavedImage *Image,
                      const int x, const int y,
