Problem with variable "visibility"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with variable "visibility"

330 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Mon Apr 07 00:41:18 MST 2014
Hello, I have a little problem compiling a project based on LPCOpen but probably it's a stupid problem ;-)

The project is composed by: LPC_CHIP_40XX from LPCOpen, and my project. If I declare OscRateIn and RTCOscRateIn in my project(I don't use Board support package), then both the variable are not visible from the clock_40xx_17xx.c file, and compiler report the error as per "undefined reference".

I've checked the clock_40xx_17xx.h and the OscRateIn is declared:

extern const uint32_t OscRateIn;

so, I checked how it is declared in the board support package:

const uint32_t OscRateIn = 12000000;

that is the same declaration I made in my own file.

What I'm doing wrong?

thank you
0 Kudos
4 Replies

307 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Sun Apr 13 05:35:05 MST 2014
Thank you.

Now everything is working fine. there was an error into a #define
0 Kudos

307 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Apr 07 03:31:49 MST 2014
Check your buid log
- is you source file being built
- is it being linked

Check your source
- check the spelling of the variables - are you *sure* it is the same?

If that doesn't give any clues, post your project
0 Kudos

307 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Mon Apr 07 03:21:03 MST 2014
I'm using C language
0 Kudos

307 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Apr 07 02:14:08 MST 2014
Are you using C or C++. If C++, don't forget "extern C { ... }"
0 Kudos