请教一下这个错误是什么意思?
[Linking...] \"C:\\CCStudio_v3.1\\C2000\\cgtools\\bin\\cl2000\" -@\"Debug.lkf\"
<Linking>
undefined first referenced
symbol in file
--------- ----------------
_DSP28x_usDelay G:\\PMSM2812\\DMC\\drvlib281x\\obj\\f281xileg_vdc.obj
_ipark_calc G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_speed_prd_calc G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_park_calc G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_F281X_EV2_PWMDAC_Update G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_DLOG_4CH_update G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_rampgen_calc G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_pid_reg3_calc G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_F281X_EV2_PWMDAC_Init G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_F281X_EV1_DRIVE_Init G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_F281X_EV1_DRIVE_Update G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_speed_frq_calc G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
_DLOG_4CH_init G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
>> error: symbol referencing errors - \'../build/pmsm3_1.out\' not built
>> Compilation failure
产生这种错误都是什么原因啊?
程序中引用/调用的 符号(函数名/变量名等)没有定义, 一般是缺少了某些源文件或库造成的。
这里的函数都是结构体里的函数,应该都是定义了的
另外请问这里的linking的时候没定义报错和编译的时候没定义报错是什么区别啊?
可能是我没理解ti结构,那位大侠帮忙解释解释
下面是其中一个没有定义的
undefined first referenced
symbol in file
--------- ----------------
_ipark_calc G:\\PMSM2812\\PMSM\\obj\\pmsm3_1.obj
这个函数是在ipark.h里定义的
...
typedef struct { 。。。数据定义略
void (*calc)(); //
} IPARK;
typedef IPARK *IPARK_handle;
/*-----------------------------------------------------------------------------
Default initalizer for the IPARK object.
-----------------------------------------------------------------------------*/
#define IPARK_DEFAULTS { //数据初值。。。
(void (*)(Uint32))ipark_calc } //**
/*------------------------------------------------------------------------------
Prototypes for the functions in IPARK.C
------------------------------------------------------------------------------*/
void ipark_calc(IPARK_handle);
...
ipark.c里的内容:
。。。
#include \"ipark.h\"
void ipark_calc(IPARK *v)
{
。。。
}
然后有个PMSM3_1.h的文件写包含ipark
#include \"ipark.h\" // Include header for the IPARK object
最后在主文件PMSM3_1.c里包含了
#include \"pmsm3_1.h\"
为什么说_ipark_calc是undefined symbol哪?多谢!