[SERVER-10558] C++ Driver: text.h compilation issues Created: 17/Aug/13 Updated: 14/Jul/16 Resolved: 21/Jun/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Guegant Jean | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | cxxcopy, driver, vc++ | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 7, Visual C++ 2012 Update 3, mongo-cxx-driver-v2.4 |
||
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| Description |
|
In VC++, the "#error temp error" directive at line 75 in file "mongo/util/text.h" isn't well interpreted. Using the directive "#error" in an header file could be the result of this weird behaviour. See the report: http://connect.microsoft.com/VisualStudio/feedback/details/757886/c1004-instead-of-c1189-when-error-is-in-a-header What I suggest is to add a "#pragma warning" before the "#error", like: |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 26/Aug/13 ] |
|
This seems to suggest that the issue is, bizarrely, related to line endings and #error. It also seems to suggest that MS has no intention of fixing this: http://connect.microsoft.com/VisualStudio/feedback/details/794991/c-error-directive-and-unix-line-endings-leads-to-an-unexpected-end-of-file |