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.

CCS编译链接的问题



如果有如下两个源文件:

1.  test.c

void test()

{}

2. main.c

int main()

{

return 0;

}

编译生成.out文件。最初我以为,main函数中没有调用函数test,那么函数test的部分不会被链接入.out文件,但经过实验验证,即使没有调用函数test,函数test的部分还是被链接进了.out文件。当然,通常情况下这没什么问题,但我碰到的情况是,我有很多函数,我只希望被我调用到的函数链接进入.out文件,否则最终生成.out文件体积太大。请问有没有什么好的办法来解决这个问题?