Results 1 to 5 of 5

Thread: Interface inheritance problems

  1. #1
    pepi is offline Registered User
    Name: Antonio Pepiciello
    Organization: Merlino Technology
    Project: Mobile Devices
    Join Date
    Jul 2007
    Posts
    8

    Interface inheritance problems

    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.

  2. #2
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    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.

  3. #3
    pepi is offline Registered User
    Name: Antonio Pepiciello
    Organization: Merlino Technology
    Project: Mobile Devices
    Join Date
    Jul 2007
    Posts
    8

    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:ispatchStatus __cdecl Ice::Object::___ice_ping(class IceInternal::Incoming &,struct Ice::Current const &)" (?___ice_ping@Object@Ice@@QAA?AW4DispatchStatus@Ic eInternal@@AAVIncoming@4@ABUCurrent@2@@Z) referenced in function "public: virtual enum IceInternal:ispatchStatus __cdecl HiveNet::Central::__dispatch(class IceInternal::Incoming &,struct Ice::Current const &)" (?__dispatch@Central@HiveNet@@UAA?AW4DispatchStatu s@IceInternal@@AAVIncoming@4@ABUCurrent@Ice@@@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.

  4. #4
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    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.

  5. #5
    pepi is offline Registered User
    Name: Antonio Pepiciello
    Organization: Merlino Technology
    Project: Mobile Devices
    Join Date
    Jul 2007
    Posts
    8

    All OK

    It works.

    Thank you very much Dwayne.

    Pepi

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Struct - inheritance
    By razvic in forum Help Center
    Replies: 1
    Last Post: 06-09-2009, 03:08 PM
  2. Callback Inheritance
    By trevorconrad in forum Comments
    Replies: 0
    Last Post: 02-12-2009, 11:28 AM
  3. Interface inheritance problem in VS 2005 EE
    By PeteH in forum Help Center
    Replies: 3
    Last Post: 07-06-2007, 07:46 AM
  4. Class inheritance problem
    By aroan in forum Help Center
    Replies: 4
    Last Post: 01-13-2005, 02:25 AM
  5. Servant inheritance
    By dashie in forum Help Center
    Replies: 12
    Last Post: 01-10-2005, 12:35 AM

Posting Permissions

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