cancel
Showing results for 
Search instead for 
Did you mean: 

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

prijazendom
Associate II
Posted on October 02, 2013 at 18:14

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. #iar-link-problem #know-your-tools
2 REPLIES 2
Posted on October 02, 2013 at 18:23

Because ''static'' infers the variable is not visible outside of main.o?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
prijazendom
Associate II
Posted on October 02, 2013 at 18:34

Shame on me...

Thanks for help,

regards...