cembedded

CCS Error[128] A #DEVICE required before this line


I am getting

Error[128]   C:\Program Files\PICC\drivers\string.h 34 : A #DEVICE required before this line

when compiling simple helloWorld.c

#include <stdio.h>

void main()
{
printf("Hi");

}

i am compiling it by command "ccsc +FM C:\vamshi\test\cFiles\Sample.c"

am using CCS, Inc. PCWHD Version 4


Solution

  • Refer to the user manual; the #DEVICE directive defines the behaviour of the compiler to accommodate the various PIC architectures and instruction set variations. However, you would not normally place this directive directly in your code but rather #include the appropriate device header for your part. You have not been specific about what part you are using, but for example:

    #include <pic16c63a.h>