AnsweredAssumed Answered

IAR Error[Li005]: no definition for : what am I doing wrong...

Question asked by b.bulek on Oct 2, 2013
Latest reply on Oct 2, 2013 by b.bulek
Hi,

I just cannot understand what I'm doing wrong...

I have :
in main.c :
static volatile uint32_t TimingDelay;
 
in main.h :
#ifndef __MAIN_H
#define __MAIN_H
extern uint32_t TimingDelay;
#endif
 
and I use this variable in cube.c:
#include "main.h"
 
void Delay(__IO uint32_t nTime)  {
  TimingDelay = nTime;
  while(TimingDelay != 0);
}

When I build project I get link error :
Error[Li005]: no definition for "TimingDelay" [referenced from J:\My Documents\Delovni\Cubesensors\Cube\IAR\STM32F0-Discovery_FW_V1.0.0\Project\Peripheral_Examples\Cubesensor\
EWARM\EXTI\Obj\cube.o]
Error while running Linker

Why doesn't function in cube.c see that variable ?

Thanks in advance,
regards,
Bulek.

Outcomes