This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SDCC error

Hello,

I am trying to convert this simple code to SDCC (due to chaninging to Linux):

// main.c

#include <t89c51cc01.h>
#include <stdio.h>

#include <lcd.h> // my own lcd header file

int i = 0;

void main()
{
    char txt[17];

    lcd_init();

    while (1)
    {
        lcd_home();
        sprintf(txt, "Zahl: %i", i);
        lcd_send_text(txt);
    }
}

void gelb() interrupt 0
{
    i++;
}

The "lcd.h" header:

// LCD header file

#ifndef _lcd_H_
#define _lcd_H_

#define DIS_ON_1 2 // to be continued

void lcd_init();
void lcd_display();
void lcd_dis_on(unsigned char i);
void lcd_dis_off();
void lcd_store();
void lcd_clear();

void lcd_send_char(unsigned char c);
void lcd_send_text(char *t);

void lcd_position(unsigned char p);
void lcd_home();

void lcd_wait();
void lcd_sec(unsigned char i);
void lcd_msec(unsigned char i);

#endif // _lcd_H_

With Keil, all worked fine. With SDCC, following code:

// main.c

#include <mcs51/8051.h>
#include <stdio.h>

#include <lcd.h>

int i = 0;

void main()
{
    char txt[17];

    lcd_init();

    while (1)
    {
        lcd_home();
        sprintf(txt, "Zahl: %i", i);
        lcd_send_text(txt);
    }
}

void gelb() interrupt 0
{
    i++;
}

I get the following errors:

?ASlink-Warning-Undefined Global '_lcd_home' referenced by module 'main'

?ASlink-Warning-Undefined Global '_lcd_init' referenced by module 'main'

?ASlink-Warning-Undefined Global '_lcd_send_text' referenced by module 'main'

It creates the .ihx file, tho...

Can anyone of you figure out what's wrong? I hope this is the right place to ask...

Thanks in advance =)