Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-7926

[c++ broker] Windows build error "cannot convert from 'int' to 'qpid::sys::PODMutex"

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: qpid-cpp-1.36.0
    • Fix Version/s: None
    • Component/s: C++ Broker
    • Labels:
      None
    • Environment:

      Windows Server 2012 R2, Visual Studio 2012, x64 build
      Today's master branch

      Description

      1>------ Build started: Project: qpidcommon, Configuration: Debug x64 ------
      1>  Logger.cpp
      1>D:\Users\crolke\git\qpid-cpp\src\qpid\log\Logger.cpp(48): error C2440: 'initializing' : cannot convert from 'int' to 'qpid::sys::PODMutex'
      1>          No constructor could take the source type, or constructor overload resolution was ambiguous
      

      The issue is with the definition of QPID_MUTEX_INITIALIZER.
      In Linux it is defined as PTHREAD_MUTEX_INITIALIZER which is a complex structure initializer.
      In Windows it is a naked 0.

      In a stand-alone windows program

      std::is_pod<PODMutex>::value
      

      returns false. In Linux the same statement in qpidd broker returns true.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chug Chuck Rolke
                Reporter:
                chug Chuck Rolke
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: