我正在eclipse中制作一个C/C++项目,自动生成makefile。我得到错误:
/home/globalcom/Desktop/Eclipse/Bi3000_testApplication/Default/../functions/functions.c:22:未定义对bi3000_clearLines'
/home/globalcom/Desktop/Eclipse/Bi3000_testApplication/Default/../functions/functions.c:25: undefined reference to
bi3000_writeDisplay的引用'/home/globalcom/Desktop/Eclipse/Bi3000_testApplication/Default/../functions/functions.c :28: 未定义引用bi3000_writeDisplay'
/home/globalcom/Desktop/Eclipse/Bi3000_testApplication/Default/../functions/functions.c:31: undefined reference to
bi3000_writeDisplay' /home/globalcom/Desktop/Eclipse/Bi3000_testApplication/Default/../functions/functions.c:34: 未定义引用 `bi3000_writeDisplay'
其中 default 是 eclipse 生成的文件夹以及保存 makefile 的位置。我在 project->properties->C/C++ General->paths and symbols 中定义了包含路径,并且项目中的所有#include 似乎都被识别,但我收到了这个编译错误。
该函数在functions.h中定义并在functions.c中声明:
void print_in_display (const char * line1, const char * line2, const char * line3, const char * line4){
const char firstline = 1;
bi3000_clearLines(0,7);
if(line1 != NULL)
writeDisplay(firstline, 0,0,8,(char *) line1);
if(line2 != NULL)
writeDisplay(firstline + 1, 0,0,8,(char *) line2);
if(line3 != NULL)
writeDisplay(firstline + 2, 0,0,8,(char *) line3);
if(line4 != NULL)
writeDisplay(firstline + 3, 0,0,8,(char *) line4);
函数 (writeDisplay) 包含在 librsm.h 中。并且在 main() 中调用 print_in_display()
提前致谢