• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Development Tools » TI C/C++ Compiler » TI C/C++ Compiler - Forum » CCS 5.1 generates the compile time error "must implement the inherited pure virtual method"
Share
TI C/C++ Compiler
  • Forum
Options
  • Subscribe via RSS

Forums

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

This question is answered
nzelmanm
Posted by nzelmanm
on Apr 19 2012 11:46 AM
Intellectual255 points

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 )

{

 }

code Composer studio CCSv5.1 CCSv5 Inheritance
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • George Mock
    Posted by George Mock
    on Apr 20 2012 09:41 AM
    Guru51390 points

    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


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question.
    The Compiler Wiki answers most common questions.
    Track an issue with SDOWP. Enter your bug id in the "Find Record ID" box.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • nzelmanm
    Posted by nzelmanm
    on Apr 20 2012 10:16 AM
    Intellectual255 points

    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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Archaeologist
    Posted by Archaeologist
    on Apr 20 2012 10:35 AM
    Mastermind40800 points

    nzelmanm
    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?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • nzelmanm
    Posted by nzelmanm
    on Apr 20 2012 10:47 AM
    Suggested Answer
    Intellectual255 points

    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 ...

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • nzelmanm
    Posted by nzelmanm
    on Apr 23 2012 19:55 PM
    Verified Answer
    Verified by nzelmanm
    Intellectual255 points

    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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use