重复定义造成的。extern int my_test_func(int);声明一个外部函数extern 说明 后面的函数或变量,不在当前的.c (.o里面)代码链接的时候才会去找。下面static int my_test_func(int a) { return a;}你又把它定义成一个内部函数。static修...
4 extern int my_test_func(int);5 static int my_test_func(int a)这两行是矛盾的 static的只能在当前的cpp文件里使用 当然不能声明为extern;全部改成static4 static int my_test_func(int);5 static int my_test...
#define MAX(a,b) (a > b ? a:b); // 这里不要分号 4 extern int my_test_func(int);
// 如果这里是声明类型不对,而且这声明也是没有必要的,如果是要外部引用,那下面的调用会出问题改为 static int my_test_func(int);5 static int...