Home Bug Reports

Interface inheritance problems

pepipepi Member Antonio PepicielloOrganization: Merlino TechnologyProject: Mobile Devices
Hi,
I've some problems compiling ice files.
I've two simple slice:
Base.ice
module test
{
interface Base
{
void Hello(string s);
};


};

..and Mybase.ice


#include <Base.ice>

module test
{
interface MyBase extends Base
{
void Welcome(string s);
};
};

I compile first Base.ice using the followig command:

slice2cppe --impl -I. Base.ice

and then the MyBase.ice with same command.


I build the generated files and I got the following compiler error in the MyBaseI.h file:

#ifndef __MyBaseI_h__
#define __MyBaseI_h__

#include <MyBase.h>

namespace test
{

class MyBaseI : virtual public MyBase,
virtual public ::test::BaseI
{
public:

virtual void Welcome(const ::std::string&,
const Ice::Current&);
};

}

#endif



Error 1 error C2039: 'BaseI' : is not a member of 'test' MyBaseI.h 11

and

Error 2 error C2504: 'BaseI' : base class undefined MyBaseI.h 11


If I put the interface definition in one slice file I haven't the above compiler error.

I got the same errors compiling the generated files both on VS 2005 and Eclipse 3.2

Can someone help me.

Thanks
Pepi.

Comments

  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    You can fix your compilation problem by manually adding an include of BaseI.h to MyBaseI.h. We will look into the possibility of changing the slice compiler so in the future this will not be necessary.
  • pepipepi Member Antonio PepicielloOrganization: Merlino TechnologyProject: Mobile Devices
    It works but..

    Thanks,
    It works using Eclipse on Ubuntu, but I have same link error using VS 2005:

    Error 1 error LNK2019: unresolved external symbol "public: enum IceInternal::DispatchStatus __cdecl Ice::Object::___ice_ping(class IceInternal::Incoming &,struct Ice::Current const &)" ([email protected]@[email protected]@QAA[email protected]@@[email protected]@[email protected]@@Z) referenced in function "public: virtual enum IceInternal::DispatchStatus __cdecl HiveNet::Central::__dispatch(class IceInternal::Incoming &,struct Ice::Current const &)" ([email protected]@[email protected]@UAA[email protected]@@Z) Central.obj

    I Build a new Project->Visual C++->Smart Device->MFC Smart Device Application->Dialog Based


    In Project->Properties->C/C++->PrecompiledHeaders->Use Precompiled Header I set "Not Using Precompiled Headers"


    In Project->Properties->Linker->Input->AdditionalDependencies I add "iceec_staticd.lib"

    What am I doing wrong?
    Pepi.
  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    If you are linking with the pure client library (iceec) you must make sure that ICEE_PURE_CLIENT is defined when you compile your C++ source files. You need to either add this define to your client project or just link with the full (icee) library.
  • pepipepi Member Antonio PepicielloOrganization: Merlino TechnologyProject: Mobile Devices
    All OK

    It works.

    Thank you very much Dwayne.

    Pepi
Sign In or Register to comment.