Hi Josh, the extern is a declaration, telling the compiler that the=20 variable will be defined somewhere else in the project. The point being=20 that you can then use it in your code in that .c file or in numerous .c=20 files. But, you have to define it somewhere, and only once: volatile uint32_t millicnt; so that millicnt actually exists. Typically you'd do this in whatever=20 ..c file has your main(). The linker is complaining that you haven't defined it. In other news, I found another XC8 compiler bug today! J Josh Koffman wrote: > Hi all, > > I am pretty sure I'm doing something wrong here. Several hours of > trying to figure out why has proven fruitless, so I need some help > clearly. > > I have a header file. In it, I declare a variable like this: > > extern volatile uint32_t millicnt; // Counter for milliseconds > > That header file is #included at the top of my main project file. It > is also included at the top of its corresponding .c file. However, if > I try to use the variable millicnt in either of those two files, I get > a linker error about an undefined symbol. This is a linker error, not > a compiler error: > > :0: error: (499) undefined symbol: > _millicnt(dist/default/production/LED_Faceplate_v1.production.ob= j) > (908) exit status =3D 1 > > Try as I might, I can't seem to puzzle this one out. There is a > typedef right above the variable declaration that does appear to work > in other files, so I'm a bit stumped here. I could just move the > declaration to another file and it would work, but this seems like a > bit of cheating. > > Any thoughts? > > Thanks! > > Josh > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .