Project, Library & Linker

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

Project, Library & Linker

156 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by GPh on Tue Jan 05 07:46:48 MST 2016
Hi,

I have some trouble with the project/library use.

I use LPCXpresso 8 with a workspace who have some projects.
Some are C project, other C Libray projects.
Each one compiled.

But when i use it in my main/root project, the linker give me errors.
I define in his property the import library path and include and assembly.

But there is order in this panels and i don't understand in which order i need to put it.

if i have :
  libA
  libB (who use libA)
  board_lib
  lpc_chip_lib
  MainProject (who use all other)

How is the good order ?

Low level first : lpc_chip, board, libA, libB Main
or
High level first : Main, libB, libA, board, chip

The -L and -l option are in the linker command line but it say me 'undefined reference' on some functions.
I miss something and i don't understand where i made wrong.


Thanks a lot.
Philippe.


0 Kudos
1 Reply

140 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Jan 06 02:26:43 MST 2016
You probably want them listed in the "Libraries (-l)" box of

Properties - C/C++ Build - Settings - MCU Linker - Libraries

in the order...

[list]
  [*]Main
  [*]libB
  [*]libA
  [*]board
  [*]chip
[/list]

And if you still have problems, then you can probably just look at which library the dependency is from and add that library a second time to the end of the list.

Note that the order in the "Library Search path (-L)" is not relevant in whether your dependencies are found.

Regards,
LPCXpresso Support
0 Kudos