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.

Inclusion ASM function in C++ code

Other Parts Discussed in Thread: TMS320C5515

How can I add my ASM function in C++ code? I have main.cpp and Encoder.asm files.

main.cpp:

void Encoder(void);
int main()
{
        Encoder();
}

Encoder.asm:

        .global _Encoder
_Encoder
        AMAR *AR0,XAR2
        MOV *AR0(short(#3)),AR1 
        ...

When I use main.c it working good but if I change to main.cpp I have error

<Linking>

undefined first referenced
symbol in file
--------- ----------------
Encoder() ./main.obj

error: unresolved symbols remain
error: errors encountered during linking; "expPR.out" not built

My board is a TMS320C5515 eZDSP.