This forum has been archived. Please start a new discussion on GitHub.

IceUtil Monitor problem

Hi there,

I'm new to the ice library and i'm trying to use a monitor object for wait-notify and locking.

When I put the line
IceUtil::Monitor<IceUtil::Mutex > monitor_;
as a private class variable, I get the following from the compiler

In instantiation of 'IceUtil::Monitor<IceUtil::Mutex>':
...fakemonitor.h:19: instantiated from here
/opt/Ice-3.0.1/include/IceUtil/Monitor.h:58: error: 'IceUtil::Monitor<T>::_mutex' has incomplete type
/opt/Ice-3.0.1/include/IceUtil/Cond.h:29: error: forward declaration of 'struct IceUtil::Mutex'

I have included the header file IceUtil/Monitor.h

Ideas welcome


Orca robotics project
Bailey Wu
Australian Centre for Field Robotics
University of Sydney


  • matthew
    matthew NL, Canada
    Before we can offer assistance you must fill out your signature information as detailed in the link contained in my signature.
  • ok, signature is up
  • matthew
    matthew NL, Canada
    It looks like you are missing an include of <IceUtil/Mutex.h>
  • haha, stupid me. I thought it was included in another header file.

    ok problem fixed! Thanks