boulder
Joined: 15 Mar 2008 Posts: 53
|
Compiling Issues with multiple files |
Posted: Mon May 05, 2008 7:15 pm |
|
|
Hi,
I am playing around a very simple code, but I got a compiler error, Quote: |
Error 128 "C:\Test\test.h" Line 1(0,8): A #DEVICE required before this line
|
My code is composed with 3 files, main.c, test.c and test.h. They are all very simple.
main.c:
Code: |
#include <16F886.h>
#include <stdio.h>
#include <stdlib.h>
#include <test.h>
#use delay(clock=8000000)
#fuses INTRC, NOWDT, PUT, MCLR, NOPROTECT, NOCPD, NOBROWNOUT, NOIESO, NOFCMEN, NOLVP, NOWRT
void main()
{
while(1)
{
lower_C0();
}
}
|
test.c:
Code: |
#include <test.h>
void lower_C0()
{
output_low(PIN_C0);
}
|
test.h
Could anyone tell me what I miss in my code? My compiler is PCM 4.071.
Thanks. |
|