Commit a69b2544 authored by Dreamer's avatar Dreamer Committed by Andreas Schuh

Fix Windows linker errors and warnings. (#166)

parent 15394d35
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
#if defined(HAVE_FNMATCH_H) #if defined(HAVE_FNMATCH_H)
# include <fnmatch.h> # include <fnmatch.h>
#elif defined(HAVE_SHLWAPI_H) #elif defined(HAVE_SHLWAPI_H)
# define NO_SHLWAPI_ISOS
# include <shlwapi.h> # include <shlwapi.h>
#endif #endif
#include <stdarg.h> // For va_list and related operations #include <stdarg.h> // For va_list and related operations
...@@ -1467,7 +1468,7 @@ FlagRegisterer::FlagRegisterer(const char* name, ...@@ -1467,7 +1468,7 @@ FlagRegisterer::FlagRegisterer(const char* name,
// Force compiler to generate code for the given template specialization. // Force compiler to generate code for the given template specialization.
#define INSTANTIATE_FLAG_REGISTERER_CTOR(type) \ #define INSTANTIATE_FLAG_REGISTERER_CTOR(type) \
template FlagRegisterer::FlagRegisterer( \ template GFLAGS_DLL_DECL FlagRegisterer::FlagRegisterer( \
const char* name, const char* help, const char* filename, \ const char* name, const char* help, const char* filename, \
type* current_storage, type* defvalue_storage) type* current_storage, type* defvalue_storage)
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
// We always want to import variables declared in user code // We always want to import variables declared in user code
#ifndef GFLAGS_DLL_DECLARE_FLAG #ifndef GFLAGS_DLL_DECLARE_FLAG
# ifdef _MSC_VER # if @GFLAGS_IS_A_DLL@ && defined(_MSC_VER)
# define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport) # define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport)
# else # else
# define GFLAGS_DLL_DECLARE_FLAG # define GFLAGS_DLL_DECLARE_FLAG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment