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.

Compiler error with SYS/BIOS type "xdc_Ptr"

Other Parts Discussed in Thread: SYSBIOS

Hi

The following code compiles fine in a .c file:

    #include <ti/sysbios/knl/Queue.h>
   
    Queue_Handle myQ;
    Queue_Elem *elem;

    myQ = Queue_create(NULL, NULL);

    for (elem = Queue_head(myQ);
        elem != (Queue_Elem *)myQ;
        elem = Queue_next(elem)) {
        ;
    }
   
but if I put it into a .cpp file I get a compile error:

error: a value of type "xdc_Ptr" cannot be assigned to an entity of type "ti_sysbios_knl_Queue_Elem *"

Please will you explain how to fix this error?

Best regards

David