Continue to Site

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.
 

(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
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
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.
 

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top