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.

Matlab程序转为DSP使用的C函数代码



已用Matlab写了一个小函数y=2*x+5,并用Matlab Codec转为DSP可用的C代码,但只是函数功能,需要调用此函数的程序,如下
1. #include <stdio.h>
2. #include "fun.h"
3.
4. int main(void)
5. {
6. // 打印计算结果
7. // 注意:一定不要忘记加上 "\n"
8. printf("y = %d\n", fun(5));
9.
10. // 断点
11. // 防止出现找不到出口错误
12. asm(" SWBP 0 ");
13.
14. return 0;
15. }
但不知此程序是单独写为main.c还是怎么写才能编译生成.out文件?