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

linker warning: UNRESOLVED EXTERNAL SYMBOL

Hi

I have a very simple code (see below linker warning) and I get following linker warning. Im working with the Silicon Laboratories IDE. How can I solve this problem? What do I have to change? Do you need more information?

Kind Regards
Peter
(

BL51 BANKED LINKER/LOCATER V5.15 - SN: Cygnal_8051Fxxx
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2004
D:\SiLabs\pause\main.obj TO
D:\SiLabs\pause\main RS(256) PL(68) PW(78) IX

*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: _PAUSE MODULE: D:\SILABS\PAUSE\MAIN.OBJ (MAIN)

*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: _PAUSE MODULE: D:\SILABS\PAUSE\MAIN.OBJ (MAIN) ADDRESS: 0014H

******************************************************************************
* RESTRICTED VERSION WITH 1000H BYTE CODE SIZE LIMIT; USED: 0016H BYTE ( 0%) *
******************************************************************************

Program Size: data=9.0 xdata=0 code=22
LINK/LOCATE RUN COMPLETE. 2 WARNING(S), 0 ERROR(S)

// main.c
#include "pause.h"

void main(void){
pause(100);
}

-----------------

// Pause.h
#ifndef PAUSE_H //Includeguard
#define PAUSE_H
void pause(int x);
#endif //PAUSE_H

-------------------

// Pause.c
#include "pause.h"
void pause(int x){
int i;
for (i=0; i<x; i++){}
}

Parents
  • Hi, Thanks for your answer.

    Yes, I already checked this out this manual. The following causes are mentioned in there:

    > The function or variable name may be wrong.
    > The function or variable may not be declared.
    > The function or variable may not be public.
    > The necessary library may not be included.
    non of them seem to be the problem in my little example.

    Kind Regards
    Peter

Reply
  • Hi, Thanks for your answer.

    Yes, I already checked this out this manual. The following causes are mentioned in there:

    > The function or variable name may be wrong.
    > The function or variable may not be declared.
    > The function or variable may not be public.
    > The necessary library may not be included.
    non of them seem to be the problem in my little example.

    Kind Regards
    Peter

Children