Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-10558

C++ Driver: text.h compilation issues

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Internal Client
    • Labels:
    • Environment:
      Windows 7, Visual C++ 2012 Update 3, mongo-cxx-driver-v2.4
    • Backwards Compatibility:
      Fully Compatible

      Description

      In VC++, the "#error temp error" directive at line 75 in file "mongo/util/text.h" isn't well interpreted.
      This lead to a confusing error C1004:
      "src\mongo/util/text.h(75) : fatal error C1004: unexpected end-of-file found"

      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:
      "#pragma message (_FILE_": temp error")"

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: