Main function is not defined --newbie--

General discussion on mikroC.
Post Reply
Author
Message
agnivesh.adhikari
Posts: 23
Joined: 12 Mar 2012 16:22
Location: Kolkata, India
Contact:

Main function is not defined --newbie--

#1 Post by agnivesh.adhikari » 12 Mar 2012 16:33

please help. when im trying to build this the following, im getting 'main function is not defined' error...

sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D7_Direction at TRISB7_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB4_bit;

void main()
{
Lcd_Init() ;
Lcd_Out(1, 1, "HELLO") ;
}

please point out the mistake in my code...
this is my first 'non led-blinking' code..hehe...

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Main function is not defined --newbie--

#2 Post by filip » 13 Mar 2012 11:53

Hi,

Have you included the main source file in the Project Manager ?

Regards,
Filip.

veljovic
Posts: 10
Joined: 11 Mar 2012 02:59

Re: Main function is not defined --newbie--

#3 Post by veljovic » 13 Mar 2012 12:35

you must check your development board.
on my easyPIC2 board is:

LCD_RS is on RB2
LCD_EN is on RB3
LCD_D4 is on RB4
LCD_D5 is on RB5
LCD_D6 is on RB6
LCD_D7 is on RB7

agnivesh.adhikari
Posts: 23
Joined: 12 Mar 2012 16:22
Location: Kolkata, India
Contact:

Re: Main function is not defined --newbie--

#4 Post by agnivesh.adhikari » 13 Mar 2012 16:45

srry guys...but i think it was just a bug...after i restart mikroc, the same code just worked fine...thanks for the reply anyways...
Best Regards,

Agnivesh Adhikari
India

Post Reply

Return to “mikroC General”