×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    2

    Carbide.C++ Compiler Error Message

    Hello,

    I am using Carbide.C++ to compile my Symbian Project and suddenly I got the following error Messages:

    Error : cannot construct CTestClassSource base class MDataSource
    Error : cannot construct CTestClassSink base class MDataSink

    I am adding functionality to these classes (I was for instance mixing in MDevSoundObserver in CTestClassSink), but nothing which should affect MDataSource/Sink and it all compiled Ok before. I can not find any documentation about this error message, so does anyone know what it means or can tell me where it is documented?

  2. #2
    Registered User
    Join Date
    Jun 2006
    Posts
    27

    Re: Carbide.C++ Compiler Error Message

    Your base classes probably do not have a default constructor defined and you are not calling any constructors from your derived class constructor.

    Example:

    public class BaseClass
    {
    ...
    BaseClass(TInt parameter);
    ...
    }

    public class DerivedClass : public BaseClass
    {
    ...
    DerivedClass();
    ...
    };

    You must do this in the derived class:

    DerivedClass:erivedClass() :
    BaseClass(someint)
    {
    }

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    2

    Re: Carbide.C++ Compiler Error Message

    Sounds reasonable, I rechecked the MDataSource description and you are correct, so I will update the code and compile when I get the chance later next week (another computer, long story).
    I guess I was fooled when the Compiler did not catch the error at first. Probably something else I forgot to do then.
    Thanks!

Similar Threads

  1. CodeWarrior compiler customization?
    By mikfi in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2006-11-28, 19:58
  2. Using the C++ Compiler Always in Carbide .vs
    By ahe in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2006-11-16, 13:20
  3. Metrowerks compiler
    By adamis22 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-06-30, 20:18
  4. Support for RealView compiler
    By svieira in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-18, 19:51
  5. compiler bug, using Metrowerks front end
    By maambach in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-12-02, 14:47

Posting Permissions

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