Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MikroC and Hi-tech C error

Status
Not open for further replies.

bbgil

Full Member level 2
Joined
Mar 11, 2006
Messages
135
Helped
13
Reputation
26
Reaction score
9
Trophy points
1,298
Activity points
2,321
_delay_ms function declared implicit int

Hi guys,
I have this question on why Hi-tech C is giving out the error while Mikro C is not. the code is very simple. I'm familiar with assembly language but just started out with c. I'm trying to see which is easier to use between the two.

void main() {
PORTC = 0;
TRISC = 0;

while(1) {
PORTC = ~PORTC;
Delay_ms(1000);
}
} //~!

THe errors in Hitec c are:
Severity Description Resource
Id
2 (499) undefined symbol: _Delay_ms
1 (361) function declared implicit int line 25
20
1 (337) line does not have a newline on the end line 26

1 (176) missing newline line 27

is it syntax error? and why is it looking for missing new line when its already the end of the program? Any help is appreciated.
 

dilraj.n

Advanced Member level 4
Joined
Feb 2, 2007
Messages
105
Helped
14
Reputation
28
Reaction score
7
Trophy points
1,298
Activity points
1,730
(499) undefined symbol: _delay_ms

hi,
delay_ms() is a built-in function of Mikroc , In hi-tech c it doesn't have a built-in function named delay_ms()
 

    bbgil

    Points: 2
    Helpful Answer Positive Rating

satya_vijayawada

Full Member level 2
Joined
Aug 17, 2005
Messages
121
Helped
22
Reputation
44
Reaction score
11
Trophy points
1,298
Activity points
1,950
hi-tech portc

#include"delay.c"

void main() {

TRISC = 0;
PORTC = 0;


while(1) {
PORTC = ~PORTC;
Delay_ms(1000);
}
} //~!




regards
:D
 

    bbgil

    Points: 2
    Helpful Answer Positive Rating

bbgil

Full Member level 2
Joined
Mar 11, 2006
Messages
135
Helped
13
Reputation
26
Reaction score
9
Trophy points
1,298
Activity points
2,321
function declared implicit int 361 hi-tech

thanks for the replies. What about the error on the end of line. that one confuses me. any particular way that c in hi-tech be ended differently than in mikro C? i thought c is c in any compilers.
 

dilraj.n

Advanced Member level 4
Joined
Feb 2, 2007
Messages
105
Helped
14
Reputation
28
Reaction score
7
Trophy points
1,298
Activity points
1,730
hi tech c missing mew line

Try this

Give a new line at the end of the code.

That means

Click at the end of your code ( after } //~! ) and hit the enter key
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top