aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/google/protobuf/descriptor_database_unittest.cc2
-rw-r--r--src/google/protobuf/extension_set.h2
-rw-r--r--vsprojects/config.h8
-rw-r--r--vsprojects/libprotobuf.vcproj16
-rw-r--r--vsprojects/readme.txt25
-rw-r--r--vsprojects/tests.vcproj4
6 files changed, 54 insertions, 3 deletions
diff --git a/src/google/protobuf/descriptor_database_unittest.cc b/src/google/protobuf/descriptor_database_unittest.cc
index 64ec551a..33de1348 100644
--- a/src/google/protobuf/descriptor_database_unittest.cc
+++ b/src/google/protobuf/descriptor_database_unittest.cc
@@ -34,6 +34,8 @@
//
// This file makes extensive use of RFC 3092. :)
+#include <algorithm>
+
#include <google/protobuf/descriptor_database.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/descriptor.pb.h>
diff --git a/src/google/protobuf/extension_set.h b/src/google/protobuf/extension_set.h
index 8e64b9bd..c23dc2b0 100644
--- a/src/google/protobuf/extension_set.h
+++ b/src/google/protobuf/extension_set.h
@@ -633,7 +633,7 @@ class LIBPROTOBUF_EXPORT ExtensionIdentifier {
private:
const int number_;
- const typename TypeTraits::ConstType default_value_;
+ typename TypeTraits::ConstType default_value_;
};
// -------------------------------------------------------------------
diff --git a/vsprojects/config.h b/vsprojects/config.h
index 95befa10..e09f297e 100644
--- a/vsprojects/config.h
+++ b/vsprojects/config.h
@@ -15,7 +15,11 @@
#define HASH_SET_H <hash_set>
/* define if the compiler has hash_map */
-#define HAVE_HASH_MAP
+#define HAVE_HASH_MAP 1
/* define if the compiler has hash_set */
-#define HAVE_HASH_SET
+#define HAVE_HASH_SET 1
+
+/* define if you want to use zlib. See readme.txt for additional
+ * requirements. */
+// #define HAVE_ZLIB 1
diff --git a/vsprojects/libprotobuf.vcproj b/vsprojects/libprotobuf.vcproj
index 834181ad..d08bf091 100644
--- a/vsprojects/libprotobuf.vcproj
+++ b/vsprojects/libprotobuf.vcproj
@@ -184,6 +184,10 @@
>
</File>
<File
+ RelativePath="..\src\google\protobuf\io\gzip_stream.h"
+ >
+ </File>
+ <File
RelativePath="..\src\google\protobuf\stubs\hash.h"
>
</File>
@@ -200,6 +204,10 @@
>
</File>
<File
+ RelativePath="..\src\google\protobuf\stubs\once.h"
+ >
+ </File>
+ <File
RelativePath="..\src\google\protobuf\compiler\parser.h"
>
</File>
@@ -304,6 +312,10 @@
>
</File>
<File
+ RelativePath="..\src\google\protobuf\io\gzip_stream.cc"
+ >
+ </File>
+ <File
RelativePath="..\src\google\protobuf\stubs\hash.cc"
>
</File>
@@ -320,6 +332,10 @@
>
</File>
<File
+ RelativePath="..\src\google\protobuf\stubs\once.cc"
+ >
+ </File>
+ <File
RelativePath="..\src\google\protobuf\compiler\parser.cc"
>
</File>
diff --git a/vsprojects/readme.txt b/vsprojects/readme.txt
index b4c8962f..8a4ac9fc 100644
--- a/vsprojects/readme.txt
+++ b/vsprojects/readme.txt
@@ -54,6 +54,31 @@ recommend that you do NOT expose protocol buffer objects in your library's
public interface, and that you statically link protocol buffers into your
library.
+ZLib support
+============
+
+If you want to include GzipInputStream and GzipOutputStream
+(google/protobuf/io/gzip_stream.h) in libprotoc, you will need to do a few
+additional steps:
+
+1) Obtain a copy of the zlib library. The pre-compiled DLL at zlib.net works.
+2) Make sure zlib's two headers are in your include path and that the .lib file
+ is in your library path. You could place all three files directly into the
+ vsproject directory to compile libprotobuf, but they need to be visible to
+ your own project as well, so you should probably just put them into the
+ VC shared icnlude and library directories.
+3) Right-click on the "tests" project and choose "properties". Navigate the
+ sidebar to "Configuration Properties" -> "Linker" -> "Input".
+4) Under "Additional Dependencies", add the name of the zlib .lib file (e.g.
+ zdll.lib). Make sure to update both the Debug and Release configurations.
+5) If you are compiling libprotobuf and libprotoc as DLLs (see previous
+ section), repeat steps 2 and 3 for the libprotobuf and libprotoc projects.
+ If you are compiling them as static libraries, then you will need to link
+ against the zlib library directly from your own app.
+6) Edit config.h (in the vsprojects directory) and un-comment the line that
+ #defines HAVE_ZLIB. (Or, alternatively, define this macro via the project
+ settings.)
+
Notes on Compiler Warnings
==========================
diff --git a/vsprojects/tests.vcproj b/vsprojects/tests.vcproj
index 68100832..4fa4ac07 100644
--- a/vsprojects/tests.vcproj
+++ b/vsprojects/tests.vcproj
@@ -291,6 +291,10 @@
>
</File>
<File
+ RelativePath="..\src\google\protobuf\stubs\once_unittest.cc"
+ >
+ </File>
+ <File
RelativePath="..\src\google\protobuf\compiler\parser_unittest.cc"
>
</File>