Linking librarys into project

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

Linking librarys into project

513 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daveczeta on Tue Nov 17 03:13:20 MST 2015
Hi,

I'm using LPCXpresso IDE latest release 7.9.2.  I have a project that is split up into 4 sub-project, 3 are libraries and 1 is exe.  The libraries are built differently i.e. have different configurations.

In my exe project, I specified all of the symbols in the pre-processor to build each library correctly.  However it's proving to be a real pain where each library project builds when it's a dependancy on the exe project but only to the manually selected configuration for each.  When means just to get an exe I have to get to each library, select the configuration, build that and then build the exe.

Why do I have to go into each library set up it's active build before building my exe - I might as well include all my source 4 times into 4 different exe projects and not bother code reuse via libs.

Project1 EXE
  Config: Debug
  Library1: DebugMain
  Library2: DebugMain
  Library3: Debug
  Library4: Debug

Project1 EXE
  Config: Release
  Library1: ReleaseMain
  Library2: ReleaseMain
  Library3: Release
  Library4: Release

Project2 EXE
  Config: Debug
  Library1: DebugBootloader
  Library2: DebugBootloader
  Library3: Debug
  Library4: Debug

Project2 EXE
  Config: Release
  Library1: ReleaseBootloader
  Library2: ReleaseBootloader
  Library3: Release
  Library4: Release

In my EXE project's I specified the symbols required for each special build of the libraries (pre-processor symbols) and reference their "lib.a" file but it's not passed on to the library project at build??

If I do not remember to select each dependent project and select the right active configuration for each EXE I end up with parts of the program using out of date code and it causes problems.

Regards

dc
0 Kudos
Reply
1 Reply

500 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Nov 17 05:34:14 MST 2015
Are you using Project References to specify your project relationships? That only uses the active build configuration. If you want to specify a specific build configuration you need to use a different setting:
Properties->C/C++ General->Paths and Symbols and the go to the "References" tab. This allows you to specify with configuration of a project to use for each build configuration.

HTH
0 Kudos
Reply