收录日期:2019/10/18 22:12:05 时间:2009-11-11 06:57:22 标签:c,undefined-symbol

I'm making a bunch of c/src files, and get:

syntax error; unexpected symbol: "EnableUART"

It is referenced in a driver.c file and defined in a .src file. It is XDEF'd correctly,

Here is the c snippet:

int main() { 
EnableUART(0, 9600, 'N');
}

Any ideas of why something gives this error? TYTY

Where is the EnableUART() defined? You need to include the header file at the top of your source file like this:

#include "library.h"

replacing library.h with the header file that includes the declaration of EnableUART().