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.

Compiler: Build time developing static library

Tool/software: TI C/C++ Compiler

My project is a static library in CCS. To test changes made in the library I have to rebuild my test executable which takes around 20 seconds. Is there a way to have my library relinked with the executable without a full rebuild? Right now when I make a change in the library I build it then I have to rebuild the executable. This is expected as the library gets compiled into the executable but is there a way to speed this up?

  • I failed to reproduce this problem in CCS 7.1.  I'll describe what I did. Perhaps I misunderstand your problem.

    I created a library project.  I created an executable project which calls a function in the library project.  The executable project is configured to use the library project as a dependent project.  I build everything.

    Then I modify a source file in the library project.  No source files are modified in the executable project.  When I build the executable project, the modified source file in the library project is compiled, and the archiver invoked to create the library.  In the executable project, no source files are compiled.  The linker is invoked to create an up-to-date executable, using the built-seconds-before library as an input.

    All of this is exactly as expected.  Nothing is compiled or rebuilt that is not required.

    Please give a similar description of what occurs in your case.  Be especially clear on the details of what goes wrong.  It is likely you will need to submit your project for further analysis.

    Thanks and regards,

    -George

  • Hi George:

    Thanks, you understand my question. The difference between our setups appears to be, "The executable project is configured to use the library project as a dependent project". All I did was add my .lib file to the executables "File Search Path" in the CCS properties window. If I make a change in the library the executable doesn't know about it. If there are no changes to the exe it doesn't relink the lib. The workaround I've been using is to make a change in the exe file. For example just adding a space and then building. What happens in this case is the exe quickly compiles the changes and relinks to the library in a couple of seconds. Is there a link that details the setup you created? That would work for me.

  • Ok added my library as a dependent project. Now it does what I want. Properties->CCS Build->Dependencies tab. Thank you.
  • Mark Lederman said:
    Ok added my library as a dependent project. Now it does what I want.

    For a complete explanation of how to do this, please see the Project Dependencies section of the article Projects and Build Handbook.

    Thanks and regards,

    -George