This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Where to set the archiver input files

My debug build creates /lib/myDebug.lib.
My release build creates /lib/myRelease.lib.
Both libs use the same set of input OBJ's:  "./file1.obj" "./file2.obj"

When the archiver runs, it adds any existing lib folder lib's to the created lib.  The resulting lib is twice as big as it should be.  More importantly, it has release library OBJ's in the debug library.  (Not good) 

ar430" rv "../lib/myDebug.lib" "./file1.obj" "./file2.obj"
  ==>  new archive '../lib/myDebug.lib'
  ==>  add './file1.obj'
  ==>  add './file2.obj'
  ==>  add '../lib/myRelease.lib'
  ==>  building archive '../lib/myDebug.lib'
'Finished building target: ../lib/myDebug.lib'

How do I stop the archiver from adding in the existing lib folder lib's?

  • Michael LAvole said:
    My debug build creates /lib/myDebug.lib.
    My release build creates /lib/myRelease.lib.

    That is not how a CCS library project is typically organized.  The typical organization is for the library to have the same name for both builds.  Each configuration is associated with a different directory that contains all the build output files (.obj, .lib, and so on).  So expect to see something like 

    • Debug/my_library_project.lib
    • Release/my_library_project.lib

    I suggest you create a very small library project as a way to learn how this works.

    Thanks and regards,

    -George

  • Is there a variable that ID's the build configuration? i.e. Debug or Release? Maybe one of the <eclipse Dynamic Variables> does this?

    ProjectA is dependent on ProjectC. When I do a debug build of ProjectA, I want to grab the ProjectC/Debug/myDebug.lib. This selection would be easy if I can pass the ProjectA build config to the --search_path. Something like: ${workspace_loc:/ProjectC/<ProjectA_BuildConfigVar>}
  • Please see this wiki article for a description of how dependent projects are typically set up.

    Thanks and regards,

    -George