error C2027: use of undefined type 'Ice::0bjectAdapter'

I'm a new guy of ICE and I got a compliation error,

Simply to say, there is a function in a class,let say,

void destroy(const Ice::Current& current)
{
......

current.adapter->remove(current.id);

......
}

And I got this error "error C2027: use of undefined type 'Ice::0bjectAdapter'"
at this line.

Looks like I did not include necessary .h, but I do include the .h which is generated from .ice . I am not sure if I missed anything else?

Could someone help me on this? I serached the forums and did not get the answer.

Thanks very much!

Comments

  • beaglesbeagles Member Brent EaglesOrganization: Eagles Technologies IncProject: Asterisk SCF ✭✭✭
    For new Ice users, I recommend looking at the demos that are bundled with the Ice source distributions. There are some neat idioms in there that will facilitate and accelerate your Ice development endeavors. You should also consider reading our newsletters. The newsletters cover topics ranging from the very rudimentary to the advanced.

    As for this particular problem, it does indeed sound like you are missing the appropriate header file. The quick route to solving this is to simply include the Ice.h header file, e.g.:

    #include <Ice/Ice.h>
  • ctennisctennis Member Caleb TennisOrganization: AEIProject: Project GINA ✭✭✭
    ZeroX wrote:
    And I got this error "error C2027: use of undefined type 'Ice::0bjectAdapter'"
    at this line.

    Maybe you just misquoted, but your error seems to indicate you are using the number 0 and not the letter O for ObjectAdapter.
  • ZeroXZeroX Member
    Thanks Brent!

    Actually, after I include <Ice/Ice.h>, everything is ok now.
    I should read more demo code at first:)
Sign In or Register to comment.