Results 1 to 5 of 5

Thread: IceUtil Monitor problem

  1. #1
    timberwolf is offline Registered User
    Name: Bailey Wu
    Organization: University of Sydney
    Project: DGC
    Join Date
    Apr 2006
    Location
    Sydney, Australia
    Posts
    17

    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

    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
    Last edited by timberwolf; 04-17-2006 at 10:48 PM.

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Before we can offer assistance you must fill out your signature information as detailed in the link contained in my signature.

  3. #3
    timberwolf is offline Registered User
    Name: Bailey Wu
    Organization: University of Sydney
    Project: DGC
    Join Date
    Apr 2006
    Location
    Sydney, Australia
    Posts
    17
    ok, signature is up
    ---------------------------------------------------------------------------
    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

  4. #4
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    It looks like you are missing an include of <IceUtil/Mutex.h>

  5. #5
    timberwolf is offline Registered User
    Name: Bailey Wu
    Organization: University of Sydney
    Project: DGC
    Join Date
    Apr 2006
    Location
    Sydney, Australia
    Posts
    17
    haha, stupid me. I thought it was included in another header file.

    ok problem fixed! 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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem with IceUtil::Mutex
    By anhpnt in forum Help Center
    Replies: 3
    Last Post: 12-04-2009, 07:09 AM
  2. IceUtil problem??
    By peter in forum Help Center
    Replies: 1
    Last Post: 04-15-2009, 06:01 PM
  3. problem with IceUtil::Monitor(link errors)
    By myaniu in forum Help Center
    Replies: 5
    Last Post: 07-12-2006, 04:53 AM
  4. typedef for Monitor?
    By acbell in forum Comments
    Replies: 1
    Last Post: 10-12-2005, 02:30 PM
  5. Queue example and IceUtil::Monitor
    By RyanFogarty in forum Help Center
    Replies: 6
    Last Post: 12-08-2004, 01:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •