This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS 5.1 generates the compile time error "must implement the inherited pure virtual method"

I have an old project for the F2812 processor that began life with CCS 3.1.

It has been progressively migrated to CCS 3.3, various versions of CCS 4.x, and finally into CCS 5 (current version 5.1.0.09000).

 

The current problem arose when I moved into the CCS 5 world.

Since migrating to CCS5.1, I get compile time errors with several classes that have multiple levels of inheritance. I will not go into all the classes but show one as an example.

 

My question is … Why did this error start cropping up in 5.1, and how do I deal with it?

 

The error messages …

The type ‘C28Flash’ must implement the inherited pure virtual method ‘ReadOnlyMemory::Erase’

The type ‘C28Flash’ must implement the inherited pure virtual method ‘ReadOnlyMemory::IsBlank’

The type ‘C28Flash’ must implement the inherited pure virtual method ‘ReadOnlyMemory::Verify’

The type ‘C28Flash’ must implement the inherited pure virtual method ‘ReadOnlyMemory::Write’

 

The Header files showing the inheritance follow ...

The contents of the C28Flash.h file are …

#pragma once

#include "ReadOnlyMemory.h"

class C28Flash : public ReadOnlyMemory

{

public:

       C28Flash( const wchar_t* _name );

       virtual bool Write( void* address, void* buffer, size_t size );

       virtual bool Verify( void* address, void* buffer, size_t size );

       virtual bool Erase( void* address, size_t size );

       virtual bool IsBlank( void* address, size_t size );

private:

       bool EraseSectors( uint16_t sectorMask );

       uint16_t GetSectorMask( void* address );

       friend class CoffLoader;

};

 

The contents of the ReadOnlyMemory.h file are …

#pragma once

#include "Object.h"

class ReadOnlyMemory : public Object

{

public:

       ReadOnlyMemory( const wchar_t* _name );

       virtual bool Write( void* address, void* buffer, size_t size ) = 0;

       virtual bool Verify( void* address, void* buffer, size_t size ) = 0;

       virtual bool Erase( void* address, size_t size ) = 0;

       virtual bool IsBlank( void* address, size_t size ) = 0;

};

///////////////////////////////////////////////////////////////////////////////

inline ReadOnlyMemory::ReadOnlyMemory( const wchar_t* _name )

       : Object( _name )

{

}

 

 

As you can see, the C28Flash class inherits from the ReadOnlyMemory class which in turn inherits from the Object class.

 

The C28Flash class does implement the functions in the C28Flash.cpp file as …

  (I have removed the code from the functions as not pertinent to this discussion.)

bool C28Flash::Write( void* address, void* buffer, size_t size )

{

}

 

bool C28Flash::Verify( void* address, void* buffer, size_t size )

{

}

 

bool C28Flash::Erase( void* address, size_t size )

{

 }

 

bool C28Flash::IsBlank( void* address, size_t size )

{

 }

  • We need to reproduce this issue here to be able to help you.  Please submit a test case as described here.  

    Thanks and regards,

    -George

  • George:  As before, I am loathe to put our company's IP onto a forum for anyone to look at.  If you could send me a private message that I can respond to, I can send you the entire project with source - This should give you a reproducable test case.

  • nzelmanm said:
    The type ‘C28Flash’ must implement the inherited pure virtual method ‘ReadOnlyMemory::Erase’

    I cannot find this error message anywhere in the compiler or linker.  What is the error number for this error?  Try enabling the -pden (--display_error_number) parser option.  Perhaps you could post a screen capture when the error message shows up?

  • I do have the Emit diagnostic identifier number (--display_error_number, -pden) checked.

    I do have some diagnostics suppressed (402, 239, 238)

    I also have one diagnostic set for Treat diagnostic <ID> as warning(--diag_warning, -pdsw)

    These are due to a different bug I reported long ago. (Seed SDSCM00040587 in the SDOWP system - created by Georgm on 6-14-2011)

    Screen capture of my "Problems" display follows ...

  • I took the following steps ...

    Deleted my workspace, Re-imported my two projects.  - same issue

    Uninstalled CCS. Deleted my TI folder. Ran a registry cleanup utility (to remove all COM references to the deleted folders.)

    Downloaded and installed the latest version of CCS 5.1

    Opened my workspace.

    Recompiled both projects.

    Problem solved.