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/EK-TM4C1294XL: CCS8.3 identifier class not defined

Guru 55653 points
Part Number: EK-TM4C1294XL

Tool/software: Code Composer Studio

CCS 7.3 upgrade to 8.3 fixes some Symbol resolve issues and causes other code analysis errors for  (uartstdlib.c, uartstdio.c)  that have never been a past problem even in CCS9.1.

The class fix was supposed to make public/class identifiers & names  be resolved. Well symbol names resolve now but identifier class not defined causes other errors. Parsing then hick-ups inside the class identifier *.h file. It may be why the uartstd~.c errors are occurring further down the include list. What is missing from the include list for CLASS identifier to be defined? It seems like the name symbol CLASS causes the parser to think it requires ( ; ) after it.   

#20 identifier "class" is undefined

class  NexObject
{
public: /* methods */

The code analysis via IDE defaults assumes uartstdlib.c has new issues, never in several versions of CCS has that occurred.

#110 expression preceding parentheses of apparent call must have (pointer-to-) function type

//
// Get the value from the varargs.
//
ui32Value = va_arg(vaArgP, uint32_t);
Syntax error:
//
// Get the value from the varargs.
//
ulValue = va_arg(arg, unsigned long);

  

  • Hello

    I am unable to reproduce the issues with my 8.3.1 installation. Can your provide a small test case (project + source)?

    Thanks

    ki

  • Hi Ki,

    Accidently clicked on resolved but the same issue is occurring in CCS9.1 too. The problem does not relate to linked files being n the project. Same errors occur even when/if the (*.cpp) and (*.h) file are physically inside the same project folder.

    https://stackoverflow.com/questions/28119867/c-error-identifier-class-name-is-undefined

  • The (va_arg) error/s do not occur in CCS9.1 or when preferences C+ code analysis is disabled.  Oddly C+ code analysis is not causing the issue in CCS8.3 project, made sure the project check marks were locally disabled too.

  • Hi Ki,

    The bigger bug is the class errors even after combining NexObject.cpp code into the NexObject.h  and Touch.cpp into NexTouch.h. excluded all the other *.cpp not of interest but the headers remained. You can add the folder to any project to see these class errors. The odder ones come from Tivaware calls top of NexInit() as the parser gets lost.

    Edit: Header files extensions changed to C++ reduced to 18 compiler errors 

    /cfs-file/__key/communityserver-discussions-components-files/81/4705.NexControls.zip

  • Hi Ki,

    After renaming *.h to *.hpp, then made a unique & separate class for the second public inheritance (below) seems to push the compiler C++ parse pointer upward. The (typedef) incomplete error seems to lead to all the other C++ parsing errors there after. The C file (nextion_ctrl.c) was calling a C++ public class function. So the C compiler had no reference from the index leading IDE to find the C++ public class being called. I also renamed public NexObject class NexGetObject believing some kind of class inheritance issue was causing C++ 59 parsing errors.

    Do you know what is wrong with the typedef leading to C++ compiler parsing errors below it? 

     

       

  • Also tested different General C++ Formatter formats (GNU,BSD,K&E - etc..), same issue. Perhaps class identifier not defined errors since the CCS IDE fails to differentiate between C & C++ calls? That was apparent as Tivaware calls (nextion_ctrl.c\NexInit()) were not being parsed correctly. After renaming (nextion_ctrl.cpp) Tivaware calls were parsed correctly but still had issues with (class) identifier being resolved in both CCS 8.3 and 9.1    

    The base Tivaware project builds successfully with no issues without the Nextion folder in the build. Perhaps the packaged C++ Formatters are not proper for the Public Class layout or some other IDE issue exists? 

  • Hello,

    Sorry for the delay. What version of the compiler are you using? I see some of the incomplete type compiler errors with v16.9.4. I will pull in someone more knowledgeable with the compiler.

    Thanks

    ki

  • Ki said:
    What version of the compiler are you using?

    Hi Ki,

    It don't matter all the way up to 5.2.8 -> 18.12.3 LTS all do the same even with C++ code analysis disabled in preferences. Mention to ArtiG in other thread it seems we can not mix C tool chain & C++ in the same source file or (class) even for *.cpp source file type.

    As C directives may be compiled first the later C++ directives are not understood in the (*.h/hpp or *.c/cpp) source files, it don't matter what the extension is made. 

    The question seems to be why in CCS can not C and C++ directives coexist in the same source file? 

  • BP101 said:
    why in CCS can not C and C++ directives coexist in the same source file? 

    For one source file that demonstrates this possible problem, please follow the directions in the article How to Submit a Compiler Test Case.

    Thanks and regards,

    -George

  • Please submit the requested test case.

    Thanks and regards,

    -George

  • Since it has been a while, I presume you have resolved your problem.  I'd appreciate hearing how you resolved it.

    Thanks and regards,

    -George

  • Hi George,

    Mentioned in other CCS9.1 post the compilers parser gets lost when C++ & tool chain commands coexist in the same source file. I simply gave up on trying to comingle source types, e.g. Tivaware library calls mingled with C++ syntax that Arduino IDE does not seem to have a problem handling.

    The 3rd party GIT library was buggy C++ syntax (class public/private) comingled with Arduino tool chain library calls via *.cpp file extension. It really didn't matter in the end having to re-write the serial I/O for TM4C1294 use without class types. Currently long/short integer conversions to 8 bit ASCII is more problematic.