-
Notifications
You must be signed in to change notification settings - Fork 0
Instaling with Visual Studio 2015
This is a tutorial for installing this project using Visual Studio 2015. Follow these instructions along side the official home page as this tutorial only explains the pitfalls and the solutions to the different problems.
When installing VS 2015 make sure you do a custom install to also include the C++ compiler. If VS 2015 was installed with the default configuration and Cmake cannot find the compiler, open VS 2015 and create a new C++ project. When prompted to download the C++ compiler, accept.
In file 3rdparty/glog/src/windows/glog/logging.h in class GOOGLE_GLOG_DLL_DECL LogStream : public std::ostream add the following lines in the public section LogStream(const LogStream &) = delete; void operator=(const LogStream &) = delete;
In file 3rdparty/glog/src/windows/port.cc change the snprintf function with:
#if !(defined(_MSC_VER) && (_MSC_VER >= 1900))
int snprintf(char *str, size_t size, const char *format, ...) {
va_list ap;
va_start(ap, format);
const int r = vsnprintf(str, size, format, ap);
va_end(ap);
return r;
}
#endif
Download the protobuf project from the official master branch and replace the folders from our project to with the folders from the official page. When using Cmake use the following flag instead: -Dprotobuf_BUILD_TESTS=OFF
replace copy 3rdparty\src\protobuf\cmake\build\Debug\libprotobuf.lib 3rdparty\lib\libprotobufd.lib with copy 3rdparty\src\protobuf\cmake\build\Debug\libprotobufd.lib 3rdparty\lib\libprotobufd.lib
Add .exe to protobuf (No sure is really needed)
Do not forget to do:
mkdir build
cd build
cmake ..