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.

error #10234-D: unresolved symbols remain error #10010: errors encountered during linking; "ADD2.out" not built

刚开始学习dsp,按照书上的例子编写了一个c和线性汇编的混合程序,总是碰到上面的问题。

求高手帮忙解答,谢谢!

undefined first referenced
symbol in file
--------- ----------------
add2 ./main.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "ADD2.out" not built

>> Compilation failure
gmake: *** [ADD2.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

.sa文件内容如下:

               .global _add2
_add2:  .cproc a, b
               .reg sum

               ADD a, b, sum

               .return sum
               .endproc

main.c文件如下:

#include<stdio.h>

int add2(int a, int b);

int main(void)
{
int c;

c = add2(3, 5);
printf("add2 is %d\n", c);
return 0;
}