Home Help Center

IceUtil Monitor problem

timberwolftimberwolf Member Bailey WuOrganization: University of SydneyProject: DGC
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

thanks.

Orca robotics project
http://orca-robotics.sourceforge.net/
Bailey Wu
Australian Centre for Field Robotics
http://www.cas.edu.au/content.php/266.html
University of Sydney
www.usyd.edu.au

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Before we can offer assistance you must fill out your signature information as detailed in the link contained in my signature.
  • timberwolftimberwolf Member Bailey WuOrganization: University of SydneyProject: DGC
    ok, signature is up
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    It looks like you are missing an include of <IceUtil/Mutex.h>
  • timberwolftimberwolf Member Bailey WuOrganization: University of SydneyProject: DGC
    haha, stupid me. I thought it was included in another header file.

    ok problem fixed! Thanks
Sign In or Register to comment.