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.

bool, dword identifiers

Hey lads,

I've been playing around with the ez430-Chronos and today installed the IAR embedded workbench but I must be missing a library because when I try to open the COM port

bool BM_OpenCOM(char * COM5, DWORD dwBaudrate = 115200, WORD wTimeout = 30, bool bRTS = false, bool bDTR = false);

It tells me that bool and DWORD are undefined identifiers. Any help on the missing file would be appreciated.

Cheers.

  • Bools is just an unsigned char and DWORD an unsigned long int.

    It' spossible that your sourcecode was designed for a compiler (CCS?) Which does define them by default while IAR doesn't.

    Since bool and DWORD are not known to by types, the texts are treated as identifiers isntead and cause this (a bit misleading) error message.

    The compiler does not analyze further so it does not detect that these two unknown terms should rather be titled as unknown type identifiers or function attributes.

    I think you can safely define the two symbols yourself. It's not a question of a missing library but rather the absence of two type definitions which are not part of standard C.
    But I don't use either CCS nor IAR, so I may be wrong.

  • Ah ok, that makes sense.

     

    I have much more experience with Matlab, so I decided to use that instead, but thanks anyway.

**Attention** This is a public forum