-
Notifications
You must be signed in to change notification settings - Fork 406
Get the code to compile with Microsoft Visual Studio 2017. #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Incidentally this fixes googleapis#100. Lots of warnings in Abseil and Protobuf code that I am chosing not to silence.
I forgot that we had an embedded grpc::Status() which does not have noexcept moves.
bigtable/client/version.h
Outdated
#if __cplusplus < 201103L | ||
#error "Bigtable C++ Client requires C++11" | ||
#endif // __cplusplus < 201103L | ||
#elif _MSC_VER < 1700 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am not wrong default and delete functions are not supported by _MSC_VER 1700 according to this. And I think we need this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Check for 1900.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor comment.
Thanks to @paprat for pointing out that key C++11 features are missing in MSVC 2013 (aka 17.00)
PTAL. |
doc/setup-development-environment.md
Outdated
automake \ | ||
build-essential \ | ||
clang \ | ||
... # More stuff ommitted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/ommitted/omitted/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
doc/setup-development-environment.md
Outdated
|
||
## Windows | ||
|
||
If you mainly use Windows as your development environment you need to install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/environment you/environment, you/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
doc/setup-development-environment.md
Outdated
in a `cmd.exe` shell, running as the `Administrator`: | ||
|
||
```commandline | ||
c:> @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use C:\>
as the prompt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
doc/setup-development-environment.md
Outdated
|
||
### Creating a Windows VM using Google Compute Engine | ||
|
||
If you do not have a Windows workstation but need a Windows development |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/workstation but/workstation, but/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
doc/setup-development-environment.md
Outdated
### Creating a Windows VM using Google Compute Engine | ||
|
||
If you do not have a Windows workstation but need a Windows development | ||
environment to troubleshoot a test or build problem it might be convenient to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/problem it/problem, it/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
doc/setup-development-environment.md
Outdated
The previous installation should create a | ||
`Developer Command Prompt for VS 2017` entry in your "Windows" menu, use that | ||
entry to create a new shell. | ||
In that shell install `vcpkg` the Microsoft supported ports for many Open Source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/shell install/shell, install/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
doc/setup-development-environment.md
Outdated
The previous installation should create a | ||
`Developer Command Prompt for VS 2017` entry in your "Windows" menu, use that | ||
entry to create a new shell. | ||
In that shell install `vcpkg` the Microsoft supported ports for many Open Source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...] vcpkg
, the Microsoft-supported [...]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
doc/setup-development-environment.md
Outdated
## Windows | ||
|
||
If you mainly use Windows as your development environment you need to install | ||
a number of tools. We use [chocolatey](https://www.chocolatey.com) to drive the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/chocolatey/Chocolatey/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
doc/setup-development-environment.md
Outdated
|
||
Then you can install the dependencies in the same shell: | ||
```commandline | ||
c:> choco install -y cmake git cmake.portable activeperl ninja golang yasm putty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- we should probably upper-case the prompt as it's typically
C:
notc:
- the prompt is typically
C:\>
but I see you're probably not including the path, because it changes (you have somecd
commands below — I typically pattern-match onC:\>
so it was a bit confusing to seec:>
as the prompt, as I don't think I've ever seen that version in my use of Windows or DOS - do you want to use
C:\...>
as the prompt to avoid updating the path? Or maybe just>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going with option 3.
doc/setup-development-environment.md
Outdated
c:> puttygen | ||
``` | ||
|
||
Then store the key in your [GitHub Settings](https://github.com/settings/keys), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two steps in this one line, so they should be split up into separate sentences for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
And we can [skip ci] for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We can [skip ci] for this.
@@ -14,6 +14,15 @@ | |||
|
|||
#include "bigtable/client/client_options.h" | |||
|
|||
#include <cstdlib> | |||
#ifdef WIN32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and elsewhere - _WIN32 is preferable (leading underscore variant) versus WIN32.
doc/setup-development-environment.md
Outdated
using your favorite RDP client. For example the | ||
[chrome extension](https://chrome.google.com/webstore/detail/chrome-rdp-for-google-clo/mpbbnannobiobpnfblimoapbephgifkm/) | ||
|
||
### Connecting to GitHub with PuTTY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW Windows 10 ships a real OpenSSH client (and server) now. I suspect that will rather quickly become a dominant SSH client for Windows developers.
These changes fix the compilation problems on Windows (actually tested with MSVC 2017, but should, work with others), they unblock @paprat so he can continue working on #23. They also fix #100.