Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

errors in compile

Status
Not open for further replies.

sanjoy

Member
The mikroC PRO compiler produce the following errors. i cannot go ahead for the errors. if anyone know the solution pls let me know. thanks.



0 1 mikroCPIC1618.exe -MSF -DBG -pP16F876A -DL -O11111114 -fo8 -N"E:\CKT\program\MyProject_Clock.mcppi" -SP"C:\Users\Sanjoy\Documents\Mikroelektronika\mikroC PRO for PIC\defs\" -SP"C:\Users\Sanjoy\Documents\Mikroelektronika\mikroC PRO for PIC\Uses\P16\" -SP"E
0 1139 Available RAM: 352 [bytes], Available ROM: 8192 [bytes]
0 126 All files Preprocessed in 171 ms

39 312 Internal error '' MyProject_Clock.c
0 122 Compilation Started __Lib_Delays.c
1 393 'Get_Fosc_kHz' Identifier redefined __Lib_Delays.c
7 393 'Delay_1us' Identifier redefined __Lib_Delays.c
11 393 'Delay_10us' Identifier redefined __Lib_Delays.c
15 393 'Delay_22us' Identifier redefined __Lib_Delays.c
19 393 'Delay_50us' Identifier redefined __Lib_Delays.c
23 393 'Delay_80us' Identifier redefined __Lib_Delays.c
27 393 'Delay_500us' Identifier redefined __Lib_Delays.c
31 393 'Delay_5500us' Identifier redefined __Lib_Delays.c
35 393 'Delay_1ms' Identifier redefined __Lib_Delays.c
39 393 'Delay_5ms' Identifier redefined __Lib_Delays.c
43 393 'Delay_8ms' Identifier redefined __Lib_Delays.c
45 312 Internal error '' __Lib_Delays.c
0 122 Compilation Started P16F876A.c
2 393 'B0' Identifier redefined P16F876A.c
3 393 'B1' Identifier redefined P16F876A.c
4 393 'B2' Identifier redefined P16F876A.c
5 393 'B3' Identifier redefined P16F876A.c
6 393 'B4' Identifier redefined P16F876A.c
7 393 'B5' Identifier redefined P16F876A.c
8 393 'B6' Identifier redefined P16F876A.c
9 393 'B7' Identifier redefined P16F876A.c
11 393 '__FLASH_SIZE' Identifier redefined P16F876A.c
14 393 'R0' Identifier redefined P16F876A.c
15 393 'R1' Identifier redefined P16F876A.c
15 312 Internal error '' P16F876A.c
0 102 Finished (with errors): 19 Dec 2014, 12:38:45 MyProject_Clock.mcppi
 
Last edited:
You DO have problems... none of those symbols called out as 'redefined' are even used in your program
I don't know how the compiler command-line is composed, but you'd better find out.
Somehow, the same library (or two very similar libraries) has been included twice
 
Its as if he hasn't included the file in the project build.... Easy mistake to make... I cant even talk him through as I only have MikroE for pic32...

I looks like he needs to start a project and paste the code in...
 
today i repair some errors. pls let me know the causes of the errors underlined in red colour. The latest errors are as follows:
0 1 mikroCPIC1618.exe -MSF -DBG -pP16F876A -DL -O11111114 -fo8 -N"E:\CKT\program\MyProject_Clock.mcppi" -SP"C:\Users\Sanjoy\Documents\Mikroelektronika\mikroC PRO for PIC\defs\" -SP"C:\Users\Sanjoy\Documents\Mikroelektronika\mikroC PRO for PIC\Uses\P16\" -SP"E
0 126 All files Preprocessed in 125 ms
0 122 Compilation Started MyProject_Clock.c
36 324 Undeclared identifier 'ANSEL' in expression MyProject_Clock.c
52 324 Undeclared identifier 'ANSEL' in expression MyProject_Clock.c
54 324 Undeclared identifier 'ANSELH' in expression MyProject_Clock.c
62 324 Undeclared identifier 'ANSEL' in expression MyProject_Clock.c

152 315 Invalid expression MyProject_Clock.c
0 122 Compilation Started __Lib_Delays.c
1 393 'Get_Fosc_kHz' Identifier redefined __Lib_Delays.c
7 393 'Delay_1us' Identifier redefined __Lib_Delays.c
11 393 'Delay_10us' Identifier redefined __Lib_Delays.c
15 393 'Delay_22us' Identifier redefined __Lib_Delays.c
19 393 'Delay_50us' Identifier redefined __Lib_Delays.c
23 393 'Delay_80us' Identifier redefined __Lib_Delays.c
27 393 'Delay_500us' Identifier redefined __Lib_Delays.c
31 393 'Delay_5500us' Identifier redefined __Lib_Delays.c
35 393 'Delay_1ms' Identifier redefined __Lib_Delays.c
39 393 'Delay_5ms' Identifier redefined __Lib_Delays.c
43 393 'Delay_8ms' Identifier redefined __Lib_Delays.c
45 312 Internal error '' __Lib_Delays.c
0 122 Compilation Started P16F876A.c
2 393 'B0' Identifier redefined P16F876A.c
3 393 'B1' Identifier redefined P16F876A.c
4 393 'B2' Identifier redefined P16F876A.c
5 393 'B3' Identifier redefined P16F876A.c
6 393 'B4' Identifier redefined P16F876A.c
7 393 'B5' Identifier redefined P16F876A.c
8 393 'B6' Identifier redefined P16F876A.c
9 393 'B7' Identifier redefined P16F876A.c
11 393 '__FLASH_SIZE' Identifier redefined P16F876A.c
14 393 'R0' Identifier redefined P16F876A.c
15 393 'R1' Identifier redefined P16F876A.c
15 312 Internal error '' P16F876A.c

0 102 Finished (with errors): 21 Dec 2014, 23:05:37 MyProject_Clock.mcppi







now the codes as ANSEL, ANSELH are underline as red mark in mikroC PRO for PIC. it wd be nice ve a chat. the new program as in attached file:
 

Attachments

  • MyProject_Clock.c
    5.8 KB · Views: 363
Last edited:
The Undeclared identifier errors are because you did not include some header-file.
The fix would look something like....

Code:
#include "filename.h"
... where 'filename' probably contains the part-number of your processor.
Go look at someone else's, successfully-compiled, code.
 
36 324 Undeclared identifier 'ANSEL' in expression MyProject_Clock.c
52 324 Undeclared identifier 'ANSEL' in expression MyProject_Clock.c
54 324 Undeclared identifier 'ANSELH' in expression MyProject_Clock.c
62 324 Undeclared identifier 'ANSEL' in expression MyProject_Clock.c
And herein lies the trouble.... This code is written for the extended pic's.... You are using a mid range...

MikroE picks the chip up from the project...Do me a snapshot of the project edit box....
 
And herein lies ETO's secret: "Do what you do well boy do what you do well".

We all have our stuff we are good at. That's why we gather here.

We have AG who is renown for his Audio advise. And many, many other Members that "know stuff" but never feel threatened to "prove themselves" to other Members....like "I know more than you nonsense"....No fights :)

A little thing I cannot really explain. It's almost like Adults respecting each others knowledge.

I have been corrected or questioned here before by the likes of Nigel :)
I love it cause I can deal with it and can reply to stuff...and end of the day/night I go to bed happy...

What other Electronic Forum can boast Members that are always happy. Never upset. Never insulted.

Honest question to everyone reading this thread I hijacked....

HAVE YOU EVER GONE TO SLEEP AT NIGHT THANKING ETO FOR BEING YOUR HOME? SAFE HAVEN AWAY FROM ALL THE CRAP OUT THERE.

Internet is a big place. Big chancers. Big liars. Big trouble.

We are so very lucky here to have a bunch of folks here that get along together.

Anyway, I have hijacked this thread long enough.

Sorry Ian. I just had to say it.

Regards,
tvtech
 
thanks for reply.
here i attached a prog folder.
thanks
 

Attachments

  • program_edt.rar
    28 KB · Views: 243
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top