Content originally posted in LPCWare by IntStarFoo on Sat Oct 20 14:48:43 MST 2012
Hi All,
First, thanks to everyone for all of the help. I work with LPCXpresso and embedded programming as a hobby, so my knowledge is quite limited. This forum has been a great help for me and I appreciate everyone’s participation. Having said that, I thought I’d share something I have learned that might save someone some time…
I have been working through some examples on the Embedded Artists Baseboard using libraries CMSIS, Lib_MCU and Lib_EaBaseBoard. I decided that I wanted to upgrade some of the examples from CMSIS 1 to CMSIS 2. As I did this, I ran into some Linker issues.
If you see something like: “undefined reference to `GPIO_SetDir'” … and you know it exists, check the order in which the libraries are linked in your configuration.
Order matters! Check your build output just above the linker error…
BAD :confused:: -lLib_MCU -lLib_EaBaseBoard -lCMSISv2p00_LPC17xx
GOOD :): -lLib_EaBaseBoard -lLib_MCU -lCMSISv2p00_LPC17xx
You can check/change this library link order in the LPCXpresso IDE under Project->Properties->Paths and Symbols->C/C++ General->Libraries (Tab)
Thanks Again,
IntStarFoo