Add an additional flag -Dprotobuf_BUILD_SHARED_LIBS=ON when invoking cmake.However, it is possible toīuild libprotobuf and libprotoc as DLLs if you really want. Recommended that you use static linkage only. Issues with Win32’s use of a separate heap for each DLL, as well as binaryĬompatibility issues between different versions of MSVC’s STL library, it is Static linking is now the default for the Protocol Buffer libraries. Similarly, release builds should link against To avoid conflicts between the MSVC debug and release runtime libraries, whenĬompiling a debug build of your application, you may need to link against aĭebug build of libprotobufd.lib with “d” postfix. Copy linking libraries libprotobuf.lib, libprotobuf-lite.lib, and libprotoc.lib wherever you put libraries.Copy protoc.exe wherever you put build tools (probably somewhere in your PATH).Copy the contents of the include directory to wherever you want to put headers.lib - that contains linking libraries and CMake configuration files for protobuf package.include - that contains C headers and protobuf *.proto files.bin - that contains protobuf protoc.exe compiler.This will create the following folders under the install location: You can also build project INSTALL from Visual Studio solution. Open the appropriate Command Prompt from the Start menu.įor example VS2013 圆4 Native Tools Command Prompt:Ĭ:\Path\to\protobuf\cmake\build\debug>nmake install Most of the instructions will be given to the Сommand Prompt, but the sameĪctions can be performed using appropriate GUI tools. You can build the project from Command PromptĪnd optionally Git installed on your computer before proceeding. This directory contains CMake files that can be used to build protobuf
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |