newbie111
Member level 2
hi guys
i tested an example code below with mikro pro c complier
it worked well got the hex
but when i use mplab + high tec c complier
it did not work
void main()
{
TRISC = 0 ; // set PORTB as OUTPUT
for(; // forever
{
PORTC = 0b00000100 ;
Delay_ms(1000) ; // wait 1000 ms
PORTC = 0 ; // turn it OFF
Delay_ms(1000) ; // wait 1000 ms
}
}
Make: The target "C:\PK2 Lessons\LPC Demo Board\09 Timer0\trying1.p1" is out of date.
Executing: "C:\Program Files\HI-TECH Software\PICC\9.70\bin\picc.exe" --pass1 "C:\PK2 Lessons\LPC Demo Board\09 Timer0\trying1.c" -q --chip=16F690 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [192] C:\PK2 Lessons\LPC Demo Board\09 Timer0\trying1.c; 3.1 undefined identifier "TRISC"
Error [192] C:\PK2 Lessons\LPC Demo Board\09 Timer0\trying1.c; 7.1 undefined identifier "PORTC"
Warning [361] C:\PK2 Lessons\LPC Demo Board\09 Timer0\trying1.c; 8.1 function declared implicit int
********** Build failed! **********
My question is is it is true that codes in c should be different when we use
different c compliers?
Thanks
i tested an example code below with mikro pro c complier
it worked well got the hex
but when i use mplab + high tec c complier
it did not work
void main()
{
TRISC = 0 ; // set PORTB as OUTPUT
for(; // forever
{
PORTC = 0b00000100 ;
Delay_ms(1000) ; // wait 1000 ms
PORTC = 0 ; // turn it OFF
Delay_ms(1000) ; // wait 1000 ms
}
}
Make: The target "C:\PK2 Lessons\LPC Demo Board\09 Timer0\trying1.p1" is out of date.
Executing: "C:\Program Files\HI-TECH Software\PICC\9.70\bin\picc.exe" --pass1 "C:\PK2 Lessons\LPC Demo Board\09 Timer0\trying1.c" -q --chip=16F690 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [192] C:\PK2 Lessons\LPC Demo Board\09 Timer0\trying1.c; 3.1 undefined identifier "TRISC"
Error [192] C:\PK2 Lessons\LPC Demo Board\09 Timer0\trying1.c; 7.1 undefined identifier "PORTC"
Warning [361] C:\PK2 Lessons\LPC Demo Board\09 Timer0\trying1.c; 8.1 function declared implicit int
********** Build failed! **********
My question is is it is true that codes in c should be different when we use
different c compliers?
Thanks