From ef54d0448f3397ee2b7274815f391389dd4cb305 Mon Sep 17 00:00:00 2001
From: Evan Ramos <Hendricks266@gmail.com>
Date: Fri, 8 Jan 2016 20:59:35 -0600
Subject: [PATCH] Build win_utf8_io directly into libFLAC when using the
 Makefile.lite and Visual Studio build systems.

---
 FLAC-vs2005.sln                                    |   2 -
 FLAC.sln                                           |   2 -
 Makefile.deps                                      |   7 -
 Makefile.lite                                      |   4 +-
 examples/c/decode/file/Makefile.lite               |   4 -
 .../c/decode/file/example_c_decode_file.vcxproj    |   4 -
 examples/c/encode/file/Makefile.lite               |   4 -
 .../c/encode/file/example_c_encode_file.vcxproj    |   4 -
 examples/cpp/decode/file/Makefile.lite             |   4 -
 .../decode/file/example_cpp_decode_file.vcxproj    |   4 -
 examples/cpp/encode/file/Makefile.lite             |   4 -
 .../encode/file/example_cpp_encode_file.vcxproj    |   4 -
 src/Makefile.lite                                  |   8 +-
 src/flac/Makefile.lite                             |   4 -
 src/flac/Makefile.lite.iffscan                     |   4 -
 src/flac/flac.vcxproj                              |   4 -
 src/flac/iffscan.vcxproj                           |   4 -
 src/libFLAC++/Makefile.lite                        |   4 -
 src/libFLAC++/libFLAC++_dynamic.vcxproj            |   4 -
 src/libFLAC++/libFLAC++_static.vcxproj             |   4 -
 src/libFLAC/Makefile.lite                          |   9 +-
 src/libFLAC/libFLAC_dynamic.vcproj                 |   8 +
 src/libFLAC/libFLAC_dynamic.vcxproj                |   6 +-
 src/libFLAC/libFLAC_dynamic.vcxproj.filters        |   6 +
 src/libFLAC/libFLAC_static.vcproj                  |   8 +
 src/libFLAC/libFLAC_static.vcxproj                 |   7 +-
 src/libFLAC/libFLAC_static.vcxproj.filters         |   6 +
 src/metaflac/Makefile.lite                         |   4 -
 src/metaflac/metaflac.vcxproj                      |   4 -
 src/plugin_common/Makefile.lite                    |   4 -
 src/plugin_common/plugin_common_static.vcxproj     |   4 -
 src/plugin_xmms/Makefile.lite                      |   4 -
 src/share/Makefile.am                              |   5 +-
 src/share/Makefile.lite                            |   4 -
 src/share/grabbag/Makefile.lite                    |   4 -
 src/share/grabbag/grabbag_static.vcxproj           |   4 -
 src/share/win_utf8_io/Makefile.lite                |  15 --
 src/share/win_utf8_io/win_utf8_io_static.vcproj    | 174 ---------------------
 src/share/win_utf8_io/win_utf8_io_static.vcxproj   | 140 -----------------
 .../win_utf8_io/win_utf8_io_static.vcxproj.filters |  22 ---
 src/test_grabbag/cuesheet/Makefile.lite            |   4 -
 src/test_grabbag/cuesheet/test_cuesheet.vcxproj    |   4 -
 src/test_grabbag/picture/Makefile.lite             |   4 -
 src/test_grabbag/picture/test_picture.vcxproj      |   4 -
 src/test_libFLAC++/Makefile.lite                   |   4 -
 src/test_libFLAC++/test_libFLAC++.vcxproj          |   4 -
 src/test_libFLAC/Makefile.lite                     |   4 -
 src/test_libFLAC/test_libFLAC.vcxproj              |   4 -
 src/test_libs_common/Makefile.lite                 |   4 -
 .../test_libs_common_static.vcxproj                |   4 -
 src/test_seeking/Makefile.lite                     |   4 -
 src/test_seeking/test_seeking.vcxproj              |   4 -
 src/test_streams/Makefile.lite                     |   8 +-
 src/test_streams/test_streams.vcxproj              |   8 +-
 src/utils/flacdiff/Makefile.lite                   |   4 -
 src/utils/flacdiff/flacdiff.vcxproj                |   4 -
 src/utils/flactimer/Makefile.lite                  |   4 -
 57 files changed, 48 insertions(+), 549 deletions(-)
 delete mode 100644 src/share/win_utf8_io/Makefile.lite
 delete mode 100644 src/share/win_utf8_io/win_utf8_io_static.vcproj
 delete mode 100644 src/share/win_utf8_io/win_utf8_io_static.vcxproj
 delete mode 100644 src/share/win_utf8_io/win_utf8_io_static.vcxproj.filters

diff --git a/FLAC-vs2005.sln b/FLAC-vs2005.sln
index db4d6b5..05e98d5 100644
--- a/FLAC-vs2005.sln
+++ b/FLAC-vs2005.sln
@@ -152,8 +152,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_streams", "src\test_st
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utf8_static", "src\share\utf8\utf8_static.vcproj", "{4CEFBC92-C215-11DB-8314-0800200C9A66}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_utf8_io_static", "src\share\win_utf8_io\win_utf8_io_static.vcproj", "{4CEFBE02-C215-11DB-8314-0800200C9A66}"
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
diff --git a/FLAC.sln b/FLAC.sln
index e16ac9e..c127743 100644
--- a/FLAC.sln
+++ b/FLAC.sln
@@ -55,8 +55,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_streams", "src\test_st
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utf8_static", "src\share\utf8\utf8_static.vcxproj", "{4CEFBC92-C215-11DB-8314-0800200C9A66}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_utf8_io_static", "src\share\win_utf8_io\win_utf8_io_static.vcxproj", "{4CEFBE02-C215-11DB-8314-0800200C9A66}"
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
diff --git a/Makefile.deps b/Makefile.deps
index c262daa..ce13a00 100644
--- a/Makefile.deps
+++ b/Makefile.deps
@@ -16,13 +16,6 @@
 #  restrictive of those mentioned above.  See the file COPYING.Xiph in this
 #  distribution.
 
-ifeq ($(findstring Windows,$(OS)),Windows) # "Windows" is provided by GNU Make's internal $(OS)
-    LIBFLAC_DEPS = share/win_utf8_io
-else
-    LIBFLAC_DEPS =
-endif
-
-libFLAC: $(LIBFLAC_DEPS)
 flac: libFLAC share
 libFLAC++: libFLAC
 metaflac: libFLAC share
diff --git a/Makefile.lite b/Makefile.lite
index 4453474..6c2a982 100644
--- a/Makefile.lite
+++ b/Makefile.lite
@@ -31,7 +31,7 @@
 
 topdir = .
 
-.PHONY: all doc src examples libFLAC libFLAC++ share/win_utf8_io share plugin_common flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
+.PHONY: all doc src examples libFLAC libFLAC++ share plugin_common flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
 all: src examples
 
 DEFAULT_CONFIG = release
@@ -52,7 +52,7 @@ doc:
 src examples:
 	(cd $@ && $(MAKE) -f Makefile.lite $(CONFIG))
 
-libFLAC libFLAC++ share/win_utf8_io share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++:
+libFLAC libFLAC++ share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++:
 	(cd src/$@ && $(MAKE) -f Makefile.lite $(CONFIG))
 
 flacdiff flactimer:
diff --git a/examples/c/decode/file/Makefile.lite b/examples/c/decode/file/Makefile.lite
index c0b52e3..c24eeb5 100644
--- a/examples/c/decode/file/Makefile.lite
+++ b/examples/c/decode/file/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = main.c
 
diff --git a/examples/c/decode/file/example_c_decode_file.vcxproj b/examples/c/decode/file/example_c_decode_file.vcxproj
index 3b16664..db14265 100644
--- a/examples/c/decode/file/example_c_decode_file.vcxproj
+++ b/examples/c/decode/file/example_c_decode_file.vcxproj
@@ -172,10 +172,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/examples/c/encode/file/Makefile.lite b/examples/c/encode/file/Makefile.lite
index 9bae4b9..07f147e 100644
--- a/examples/c/encode/file/Makefile.lite
+++ b/examples/c/encode/file/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = main.c
 
diff --git a/examples/c/encode/file/example_c_encode_file.vcxproj b/examples/c/encode/file/example_c_encode_file.vcxproj
index 60bf39c..edf464b 100644
--- a/examples/c/encode/file/example_c_encode_file.vcxproj
+++ b/examples/c/encode/file/example_c_encode_file.vcxproj
@@ -172,10 +172,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/examples/cpp/decode/file/Makefile.lite b/examples/cpp/decode/file/Makefile.lite
index fe9a31a..b559edc 100644
--- a/examples/cpp/decode/file/Makefile.lite
+++ b/examples/cpp/decode/file/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = main.cpp
 
diff --git a/examples/cpp/decode/file/example_cpp_decode_file.vcxproj b/examples/cpp/decode/file/example_cpp_decode_file.vcxproj
index d105bb4..6dde67e 100644
--- a/examples/cpp/decode/file/example_cpp_decode_file.vcxproj
+++ b/examples/cpp/decode/file/example_cpp_decode_file.vcxproj
@@ -176,10 +176,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/examples/cpp/encode/file/Makefile.lite b/examples/cpp/encode/file/Makefile.lite
index cc5583f..43a952e 100644
--- a/examples/cpp/encode/file/Makefile.lite
+++ b/examples/cpp/encode/file/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = main.cpp
 
diff --git a/examples/cpp/encode/file/example_cpp_encode_file.vcxproj b/examples/cpp/encode/file/example_cpp_encode_file.vcxproj
index 793f62c..271b50a 100644
--- a/examples/cpp/encode/file/example_cpp_encode_file.vcxproj
+++ b/examples/cpp/encode/file/example_cpp_encode_file.vcxproj
@@ -176,10 +176,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/Makefile.lite b/src/Makefile.lite
index 8b92816..6f80508 100644
--- a/src/Makefile.lite
+++ b/src/Makefile.lite
@@ -31,11 +31,7 @@ else
 endif
 endif
 
-ifeq ($(findstring Windows,$(OS)),Windows)
-    EXTRA_TARGETS += share/win_utf8_io
-endif
-
-.PHONY: all flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share/win_utf8_io share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
+.PHONY: all flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
 all: flac libFLAC libFLAC++ metaflac plugin_common $(EXTRA_TARGETS) share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams
 
 DEFAULT_CONFIG = release
@@ -50,7 +46,7 @@ debug   : all
 valgrind: all
 release : all
 
-flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share/win_utf8_io share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams:
+flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams:
 	(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
 
 flacdiff flactimer:
diff --git a/src/flac/Makefile.lite b/src/flac/Makefile.lite
index f143bd4..a5e35af 100644
--- a/src/flac/Makefile.lite
+++ b/src/flac/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I./include -I$(topdir)/include $(OGG_INCLUDES)
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(libdir)/libgetopt.a $(libdir)/libutf8.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lreplaygain_synthesis -lgetopt -lutf8 -lgrabbag -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lreplaygain_synthesis -lgetopt -lutf8 -lgrabbag $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	analyze.c \
diff --git a/src/flac/Makefile.lite.iffscan b/src/flac/Makefile.lite.iffscan
index 90bf3cc..fa06f18 100644
--- a/src/flac/Makefile.lite.iffscan
+++ b/src/flac/Makefile.lite.iffscan
@@ -30,12 +30,8 @@ INCLUDES = -I./include -I$(topdir)/include $(OGG_INCLUDES)
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	foreign_metadata.c \
diff --git a/src/flac/flac.vcxproj b/src/flac/flac.vcxproj
index ac7f4ea..70b50cc 100644
--- a/src/flac/flac.vcxproj
+++ b/src/flac/flac.vcxproj
@@ -208,10 +208,6 @@
       <Project>{4cefbc92-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/flac/iffscan.vcxproj b/src/flac/iffscan.vcxproj
index 98b5076..530fb9e 100644
--- a/src/flac/iffscan.vcxproj
+++ b/src/flac/iffscan.vcxproj
@@ -180,10 +180,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/libFLAC++/Makefile.lite b/src/libFLAC++/Makefile.lite
index 800d3e7..6ddd941 100644
--- a/src/libFLAC++/Makefile.lite
+++ b/src/libFLAC++/Makefile.lite
@@ -43,16 +43,12 @@ endif
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -lstdc++
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm -lsupc++
-else
 ifeq ($(OS),FreeBSD)
     LIBS = -lFLAC $(OGG_LIBS) -lm -lstdc++
 else
     LIBS = -lFLAC $(OGG_LIBS) -lm -lsupc++
 endif
 endif
-endif
 
 LIB_NAME = libFLAC++
 INCLUDES = -I$(topdir)/include
diff --git a/src/libFLAC++/libFLAC++_dynamic.vcxproj b/src/libFLAC++/libFLAC++_dynamic.vcxproj
index e79e2dc..12b4fb0 100644
--- a/src/libFLAC++/libFLAC++_dynamic.vcxproj
+++ b/src/libFLAC++/libFLAC++_dynamic.vcxproj
@@ -173,10 +173,6 @@
       <Project>{4cefbc83-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/libFLAC++/libFLAC++_static.vcxproj b/src/libFLAC++/libFLAC++_static.vcxproj
index d45f1ee..21994bd 100644
--- a/src/libFLAC++/libFLAC++_static.vcxproj
+++ b/src/libFLAC++/libFLAC++_static.vcxproj
@@ -141,10 +141,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/libFLAC/Makefile.lite b/src/libFLAC/Makefile.lite
index 722acfb..da7a110 100644
--- a/src/libFLAC/Makefile.lite
+++ b/src/libFLAC/Makefile.lite
@@ -38,12 +38,8 @@ topdir = ../..
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = $(OGG_LIBS) -lm
 endif
-endif
 
 LIB_NAME = libFLAC
 ifeq ($(PROC),ppc)
@@ -75,6 +71,10 @@ OGG_SRCS_C = \
 	ogg_helper.c \
 	ogg_mapping.c
 
+ifeq ($(findstring Windows,$(OS)),Windows)
+	WINDOWS_SRCS_C = ../share/win_utf8_io/win_utf8_io.c
+endif
+
 SRCS_C = \
 	bitmath.c \
 	bitreader.c \
@@ -102,6 +102,7 @@ SRCS_C = \
 	stream_encoder_intrin_avx2.c \
 	stream_encoder_framing.c \
 	window.c \
+	$(WINDOWS_SRCS_C) \
 	$(OGG_SRCS)
 
 include $(topdir)/build/lib.mk
diff --git a/src/libFLAC/libFLAC_dynamic.vcproj b/src/libFLAC/libFLAC_dynamic.vcproj
index d372d34..2724863 100644
--- a/src/libFLAC/libFLAC_dynamic.vcproj
+++ b/src/libFLAC/libFLAC_dynamic.vcproj
@@ -395,6 +395,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\share\win_utf8_io\win_utf8_io.c"
+				>
+			</File>
+			<File
 				RelativePath=".\window.c"
 				>
 			</File>
@@ -438,6 +442,10 @@
 				RelativePath="..\..\include\FLAC\stream_encoder.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\share\win_utf8_io.h"
+				>
+			</File>
 		</Filter>
 		<File
 			RelativePath=".\ia32\cpu_asm.nasm"
diff --git a/src/libFLAC/libFLAC_dynamic.vcxproj b/src/libFLAC/libFLAC_dynamic.vcxproj
index 89f24e2..a8f2654 100644
--- a/src/libFLAC/libFLAC_dynamic.vcxproj
+++ b/src/libFLAC/libFLAC_dynamic.vcxproj
@@ -184,6 +184,7 @@
     <ClInclude Include="..\..\include\FLAC\ordinals.h" />
     <ClInclude Include="..\..\include\FLAC\stream_decoder.h" />
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h" />
+    <ClInclude Include="..\..\include\share\win_utf8_io.h" />
     <ClInclude Include="ia32\nasm.h" />
     <ClInclude Include="include\private\all.h" />
     <ClInclude Include="include\private\bitmath.h" />
@@ -250,6 +251,7 @@
     <ClCompile Include="stream_encoder_intrin_sse2.c" />
     <ClCompile Include="stream_encoder_intrin_ssse3.c" />
     <ClCompile Include="window.c" />
+    <ClCompile Include="..\share\win_utf8_io\win_utf8_io.c" />
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="ia32\cpu_asm.nasm">
@@ -314,10 +316,6 @@
     </CustomBuild>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/libFLAC/libFLAC_dynamic.vcxproj.filters b/src/libFLAC/libFLAC_dynamic.vcxproj.filters
index fa79a8d..cb07e59 100644
--- a/src/libFLAC/libFLAC_dynamic.vcxproj.filters
+++ b/src/libFLAC/libFLAC_dynamic.vcxproj.filters
@@ -113,6 +113,9 @@
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h">
       <Filter>Public Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\include\share\win_utf8_io.h">
+      <Filter>Public Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="bitmath.c">
@@ -205,6 +208,9 @@
     <ClCompile Include="window.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\share\win_utf8_io\win_utf8_io.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="ia32\cpu_asm.nasm" />
diff --git a/src/libFLAC/libFLAC_static.vcproj b/src/libFLAC/libFLAC_static.vcproj
index fe0ac58..f8d4786 100644
--- a/src/libFLAC/libFLAC_static.vcproj
+++ b/src/libFLAC/libFLAC_static.vcproj
@@ -293,6 +293,10 @@
 				RelativePath="..\..\include\FLAC\stream_encoder.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\share\win_utf8_io.h"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="Source Files"
@@ -411,6 +415,10 @@
 				RelativePath=".\window.c"
 				>
 			</File>
+			<File
+				RelativePath="..\share\win_utf8_io\win_utf8_io.c"
+				>
+			</File>
 		</Filter>
 		<File
 			RelativePath=".\ia32\cpu_asm.nasm"
diff --git a/src/libFLAC/libFLAC_static.vcxproj b/src/libFLAC/libFLAC_static.vcxproj
index 8cc1902..4e32bad 100644
--- a/src/libFLAC/libFLAC_static.vcxproj
+++ b/src/libFLAC/libFLAC_static.vcxproj
@@ -144,6 +144,7 @@
     <ClInclude Include="..\..\include\FLAC\ordinals.h" />
     <ClInclude Include="..\..\include\FLAC\stream_decoder.h" />
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h" />
+    <ClInclude Include="..\..\include\share\win_utf8_io.h" />
     <ClInclude Include="ia32\nasm.h" />
     <ClInclude Include="include\private\all.h" />
     <ClInclude Include="include\private\bitmath.h" />
@@ -210,6 +211,7 @@
     <ClCompile Include="stream_encoder_intrin_sse2.c" />
     <ClCompile Include="stream_encoder_intrin_ssse3.c" />
     <ClCompile Include="window.c" />
+    <ClCompile Include="..\share\win_utf8_io\win_utf8_io.c" />
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="ia32\cpu_asm.nasm">
@@ -273,11 +275,6 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     </CustomBuild>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-    </ProjectReference>
-  </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
diff --git a/src/libFLAC/libFLAC_static.vcxproj.filters b/src/libFLAC/libFLAC_static.vcxproj.filters
index bc99bf3..7ae09cf 100644
--- a/src/libFLAC/libFLAC_static.vcxproj.filters
+++ b/src/libFLAC/libFLAC_static.vcxproj.filters
@@ -113,6 +113,9 @@
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h">
       <Filter>Public Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\include\share\win_utf8_io.h">
+      <Filter>Public Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="bitmath.c">
@@ -205,6 +208,9 @@
     <ClCompile Include="window.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\share\win_utf8_io\win_utf8_io.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="ia32\cpu_asm.nasm" />
diff --git a/src/metaflac/Makefile.lite b/src/metaflac/Makefile.lite
index 2866c22..b0580a8 100644
--- a/src/metaflac/Makefile.lite
+++ b/src/metaflac/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I./include -I$(topdir)/include $(OGG_INCLUDES)
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(libdir)/libgetopt.a $(libdir)/libutf8.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lgetopt -lutf8 -lgrabbag -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lgetopt -lutf8 -lgrabbag $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	main.c \
diff --git a/src/metaflac/metaflac.vcxproj b/src/metaflac/metaflac.vcxproj
index 54d584f..2f5894a 100644
--- a/src/metaflac/metaflac.vcxproj
+++ b/src/metaflac/metaflac.vcxproj
@@ -203,10 +203,6 @@
       <Project>{4cefbc92-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/plugin_common/Makefile.lite b/src/plugin_common/Makefile.lite
index 7d9683a..673f1db 100644
--- a/src/plugin_common/Makefile.lite
+++ b/src/plugin_common/Makefile.lite
@@ -28,12 +28,8 @@ INCLUDES = -I$(topdir)/include -I$(HOME)/local/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	charset.c \
diff --git a/src/plugin_common/plugin_common_static.vcxproj b/src/plugin_common/plugin_common_static.vcxproj
index 880dbcc..411c18c 100644
--- a/src/plugin_common/plugin_common_static.vcxproj
+++ b/src/plugin_common/plugin_common_static.vcxproj
@@ -151,10 +151,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/plugin_xmms/Makefile.lite b/src/plugin_xmms/Makefile.lite
index ec101a3..b713f6d 100644
--- a/src/plugin_xmms/Makefile.lite
+++ b/src/plugin_xmms/Makefile.lite
@@ -29,12 +29,8 @@ INCLUDES  = -I./include -I$(topdir)/include -I.. $(shell xmms-config --cflags)
 ifeq ($(OS),Darwin)
     LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm -lstdc++ -lz
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(libdir)/libwin_utf8_io.a $(OGG_LIBS) -lm -lsupc++ -lz
-else
     LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_LIBS) -lm -lsupc++ -lz
 endif
-endif
 
 SRCS_C = \
 	charset.c \
diff --git a/src/share/Makefile.am b/src/share/Makefile.am
index c2feb6e..ce17626 100644
--- a/src/share/Makefile.am
+++ b/src/share/Makefile.am
@@ -47,10 +47,7 @@ EXTRA_DIST = \
 	utf8/iconvert.h \
 	utf8/utf8_static.vcproj \
 	utf8/utf8_static.vcxproj \
-	utf8/utf8_static.vcxproj.filters \
-	win_utf8_io/win_utf8_io_static.vcproj \
-	win_utf8_io/win_utf8_io_static.vcxproj \
-	win_utf8_io/win_utf8_io_static.vcxproj.filters
+	utf8/utf8_static.vcxproj.filters
 
 
 noinst_LTLIBRARIES = \
diff --git a/src/share/Makefile.lite b/src/share/Makefile.lite
index c4558d6..24dcf6f 100644
--- a/src/share/Makefile.lite
+++ b/src/share/Makefile.lite
@@ -46,13 +46,9 @@ replaygain_synthesis:
 utf8:
 	(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
 
-win_utf8_io:
-	(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
-
 clean:
 	-(cd getopt ; $(MAKE) -f Makefile.lite clean)
 	-(cd grabbag ; $(MAKE) -f Makefile.lite clean)
 	-(cd replaygain_analysis ; $(MAKE) -f Makefile.lite clean)
 	-(cd replaygain_synthesis ; $(MAKE) -f Makefile.lite clean)
 	-(cd utf8 ; $(MAKE) -f Makefile.lite clean)
-	-(cd win_utf8_io ; $(MAKE) -f Makefile.lite clean)
diff --git a/src/share/grabbag/Makefile.lite b/src/share/grabbag/Makefile.lite
index 4eac54b..7860cc5 100644
--- a/src/share/grabbag/Makefile.lite
+++ b/src/share/grabbag/Makefile.lite
@@ -8,12 +8,8 @@ libdir = $(topdir)/objs/$(BUILD)/lib
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lreplaygain_analysis -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC -lreplaygain_analysis $(OGG_LIBS) -lm
 endif
-endif
 
 LIB_NAME = libgrabbag
 INCLUDES = -I$(topdir)/include
diff --git a/src/share/grabbag/grabbag_static.vcxproj b/src/share/grabbag/grabbag_static.vcxproj
index 8ae6a28..8e7b6fd 100644
--- a/src/share/grabbag/grabbag_static.vcxproj
+++ b/src/share/grabbag/grabbag_static.vcxproj
@@ -154,10 +154,6 @@
       <Project>{4cefbc89-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/share/win_utf8_io/Makefile.lite b/src/share/win_utf8_io/Makefile.lite
deleted file mode 100644
index b941b07..0000000
--- a/src/share/win_utf8_io/Makefile.lite
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# GNU makefile
-#
-
-topdir = ../../..
-
-LIB_NAME = libwin_utf8_io
-INCLUDES = -I$(topdir)/include
-
-SRCS_C = \
-	win_utf8_io.c
-
-include $(topdir)/build/lib.mk
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/src/share/win_utf8_io/win_utf8_io_static.vcproj b/src/share/win_utf8_io/win_utf8_io_static.vcproj
deleted file mode 100644
index 00eeea7..0000000
--- a/src/share/win_utf8_io/win_utf8_io_static.vcproj
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="win_utf8_io_static"
-	ProjectGUID="{4cefbe02-c215-11db-8314-0800200c9a66}"
-	RootNamespace="win_utf8_io_static"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)objs\$(ConfigurationName)\lib"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="4"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories=".\include;..\..\..\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLAC__NO_DLL;DEBUG"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-				CompileAs="0"
-				DisableSpecificWarnings="4267;4996"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)objs\$(ConfigurationName)\lib"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="4"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=".\include;..\..\..\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLAC__NO_DLL"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-				DisableSpecificWarnings="4267;4996"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Public Header Files"
-			>
-			<File
-				RelativePath="..\..\..\include\share\win_utf8_io.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath=".\win_utf8_io.c"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/share/win_utf8_io/win_utf8_io_static.vcxproj b/src/share/win_utf8_io/win_utf8_io_static.vcxproj
deleted file mode 100644
index aa9a3ee..0000000
--- a/src/share/win_utf8_io/win_utf8_io_static.vcxproj
+++ /dev/null
@@ -1,140 +0,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{4cefbe02-c215-11db-8314-0800200c9a66}</ProjectGuid>
-    <RootNamespace>win_utf8_io_static</RootNamespace>
-    <Keyword>Win32Proj</Keyword>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup>
-    <_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <OutDir>$(SolutionDir)objs\$(Configuration)\lib\</OutDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <OutDir>$(SolutionDir)objs\$(Platform)\$(Configuration)\lib\</OutDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <OutDir>$(SolutionDir)objs\$(Configuration)\lib\</OutDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <OutDir>$(SolutionDir)objs\$(Platform)\$(Configuration)\lib\</OutDir>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.\include;..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;FLAC__NO_DLL;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.\include;..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;FLAC__NO_DLL;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-      <OmitFramePointers>true</OmitFramePointers>
-      <WholeProgramOptimization>true</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.\include;..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;FLAC__NO_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <ClCompile>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-      <OmitFramePointers>true</OmitFramePointers>
-      <WholeProgramOptimization>true</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.\include;..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;FLAC__NO_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\..\include\share\win_utf8_io.h" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="win_utf8_io.c" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>
\ No newline at end of file
diff --git a/src/share/win_utf8_io/win_utf8_io_static.vcxproj.filters b/src/share/win_utf8_io/win_utf8_io_static.vcxproj.filters
deleted file mode 100644
index e44a0c7..0000000
--- a/src/share/win_utf8_io/win_utf8_io_static.vcxproj.filters
+++ /dev/null
@@ -1,22 +0,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="Public Header Files">
-      <UniqueIdentifier>{6469e7f2-0837-4004-9f36-27d45ed62336}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Source Files">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\..\include\share\win_utf8_io.h">
-      <Filter>Public Header Files</Filter>
-    </ClInclude>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="win_utf8_io.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-  </ItemGroup>
-</Project>
\ No newline at end of file
diff --git a/src/test_grabbag/cuesheet/Makefile.lite b/src/test_grabbag/cuesheet/Makefile.lite
index 9fe694d..5e77fea 100644
--- a/src/test_grabbag/cuesheet/Makefile.lite
+++ b/src/test_grabbag/cuesheet/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I./include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	main.c
diff --git a/src/test_grabbag/cuesheet/test_cuesheet.vcxproj b/src/test_grabbag/cuesheet/test_cuesheet.vcxproj
index 790b234..c6b7896 100644
--- a/src/test_grabbag/cuesheet/test_cuesheet.vcxproj
+++ b/src/test_grabbag/cuesheet/test_cuesheet.vcxproj
@@ -168,10 +168,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/test_grabbag/picture/Makefile.lite b/src/test_grabbag/picture/Makefile.lite
index 10ebfe0..fe57b4c 100644
--- a/src/test_grabbag/picture/Makefile.lite
+++ b/src/test_grabbag/picture/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I./include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	main.c
diff --git a/src/test_grabbag/picture/test_picture.vcxproj b/src/test_grabbag/picture/test_picture.vcxproj
index cd2aa74..cb52126 100644
--- a/src/test_grabbag/picture/test_picture.vcxproj
+++ b/src/test_grabbag/picture/test_picture.vcxproj
@@ -168,10 +168,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/test_libFLAC++/Makefile.lite b/src/test_libFLAC++/Makefile.lite
index 69d1a84..f520a6e 100644
--- a/src/test_libFLAC++/Makefile.lite
+++ b/src/test_libFLAC++/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = \
 	decoders.cpp \
diff --git a/src/test_libFLAC++/test_libFLAC++.vcxproj b/src/test_libFLAC++/test_libFLAC++.vcxproj
index 5baeb96..d3b302b 100644
--- a/src/test_libFLAC++/test_libFLAC++.vcxproj
+++ b/src/test_libFLAC++/test_libFLAC++.vcxproj
@@ -182,10 +182,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
     <ProjectReference Include="..\test_libs_common\test_libs_common_static.vcxproj">
       <Project>{4cefbc8e-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/src/test_libFLAC/Makefile.lite b/src/test_libFLAC/Makefile.lite
index e95beb3..2e1f816 100644
--- a/src/test_libFLAC/Makefile.lite
+++ b/src/test_libFLAC/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I../libFLAC/include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	bitwriter.c \
diff --git a/src/test_libFLAC/test_libFLAC.vcxproj b/src/test_libFLAC/test_libFLAC.vcxproj
index 3151769..052c9d9 100644
--- a/src/test_libFLAC/test_libFLAC.vcxproj
+++ b/src/test_libFLAC/test_libFLAC.vcxproj
@@ -194,10 +194,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
     <ProjectReference Include="..\test_libs_common\test_libs_common_static.vcxproj">
       <Project>{4cefbc8e-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/src/test_libs_common/Makefile.lite b/src/test_libs_common/Makefile.lite
index abf2f1e..cb970a6 100644
--- a/src/test_libs_common/Makefile.lite
+++ b/src/test_libs_common/Makefile.lite
@@ -28,12 +28,8 @@ LIB_NAME = libtest_libs_common
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 INCLUDES = -I$(topdir)/include
 
diff --git a/src/test_libs_common/test_libs_common_static.vcxproj b/src/test_libs_common/test_libs_common_static.vcxproj
index 1e41c7b..812c8c3 100644
--- a/src/test_libs_common/test_libs_common_static.vcxproj
+++ b/src/test_libs_common/test_libs_common_static.vcxproj
@@ -137,10 +137,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/test_seeking/Makefile.lite b/src/test_seeking/Makefile.lite
index 5ada17d..b5fdc72 100644
--- a/src/test_seeking/Makefile.lite
+++ b/src/test_seeking/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I../libFLAC/include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	main.c
diff --git a/src/test_seeking/test_seeking.vcxproj b/src/test_seeking/test_seeking.vcxproj
index 71c3cff..cc20367 100644
--- a/src/test_seeking/test_seeking.vcxproj
+++ b/src/test_seeking/test_seeking.vcxproj
@@ -172,10 +172,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/test_streams/Makefile.lite b/src/test_streams/Makefile.lite
index b144523..c033aa7 100644
--- a/src/test_streams/Makefile.lite
+++ b/src/test_streams/Makefile.lite
@@ -30,13 +30,9 @@ PROGRAM_NAME = test_streams
 INCLUDES = -I./include -I$(topdir)/include
 
 ifeq ($(OS),Darwin)
-    EXPLICIT_LIBS = $(libdir)/libgrabbag.a -lm
+    EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libFLAC.a -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lwin_utf8_io -lm
-else
-    LIBS = -lgrabbag -lm
-endif
+    LIBS = -lgrabbag -lFLAC -lm
 endif
 
 SRCS_C = \
diff --git a/src/test_streams/test_streams.vcxproj b/src/test_streams/test_streams.vcxproj
index f9d9cd2..c65086d 100644
--- a/src/test_streams/test_streams.vcxproj
+++ b/src/test_streams/test_streams.vcxproj
@@ -164,12 +164,12 @@
     <ClCompile Include="main.c" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\share\grabbag\grabbag_static.vcxproj">
-      <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
+    <ProjectReference Include="..\libFLAC\libFLAC_static.vcxproj">
+      <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
+    <ProjectReference Include="..\share\grabbag\grabbag_static.vcxproj">
+      <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
   </ItemGroup>
diff --git a/src/utils/flacdiff/Makefile.lite b/src/utils/flacdiff/Makefile.lite
index e804723..adc7dcf 100644
--- a/src/utils/flacdiff/Makefile.lite
+++ b/src/utils/flacdiff/Makefile.lite
@@ -30,12 +30,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = \
 	main.cpp
diff --git a/src/utils/flacdiff/flacdiff.vcxproj b/src/utils/flacdiff/flacdiff.vcxproj
index 8987986..0b8592c 100644
--- a/src/utils/flacdiff/flacdiff.vcxproj
+++ b/src/utils/flacdiff/flacdiff.vcxproj
@@ -168,10 +168,6 @@
       <Project>{4cefbc86-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/utils/flactimer/Makefile.lite b/src/utils/flactimer/Makefile.lite
index 1eb0759..8bacac1 100644
--- a/src/utils/flactimer/Makefile.lite
+++ b/src/utils/flactimer/Makefile.lite
@@ -30,12 +30,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = \
 	main.cpp
-- 
2.6.0.windows.1

