Added NOMINMAX macro definition#40
Merged
Merged
Conversation
Without this macro, there are following errors in VS:
```bash
...\vsg\src\include\vsg/viewer/Window.h(156): warning C4003: not enough arguments for function-like macro invocation 'max'
1>...\vsg\src\include\vsg/viewer/Window.h(156): error C2589: '(': illegal token on right side of '::'
1>...\vsg\src\include\vsg/viewer/Window.h(156): error C2059: syntax error: ')'
1>...\vsg\src\include\vsg/viewer/Window.h(156): error C2062: type 'unknown-type' unexpected
1>...\vsg\src\include\vsg/viewer/Window.h(219): fatal error C1903: unable to recover from previous error(s); stopping compilation
```
Since we already in `platform/win32/Win32_Window.h`, I skipped the `ifdef _WIN32` guard
Contributor
|
The nominmax is interesting, I and others have been building with VisualStudio 2017 Community (i'm on 15.9.1). I wonder why you had the issue, windows sdk version perhaps? Not that is matters just interesting it's happening, and thanks for providing a fix. |
Contributor
Author
|
@tomhog I'm using VS Community Edition 2017 v15.9.7, SDK 10.0.17763.132 |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Description
Without this macro, there are following errors in VS:
Since we already in
platform/win32/Win32_Window.h, I skipped theifdef _WIN32guardType of change
[x] Compiler error
How Has This Been Tested?
Compiling
vsg,osg2vsgand runningvsgExamplesin RELEASE/DEBUG configurations on Windows10, 64-bit version, using CMake v 3.13.3 and VS Community Edition 2017 v15.9.6