Regenerating .o files

Showing results for 
Search instead for 
Did you mean: 

Regenerating .o files

Contributor I

I have a project which has a large number of precompiled .o files.  I also have the source code to generate these files but they are not currently a part of the project. I want to change the project so that every time I rebuild, the .o files are generated from scratch from the .c and .h files so that I can debug the code, but I can't figure out how to do this.

If I clean the project, the .o files remain, and if I just drop the source files into the project I get compile errors from multiple definition of the functions in the source files. If I just delete the .o files and try to rebuild I immediately get a dialog-box error message to the tune that :

"  'build project' has encountered a problem. Errors occurred during the build. "

I am assuming that there is some project setting which stipulates that the .o files are all there, precompiled and ready to use, but I cannot find it. Could anyone point me in the right direction?



0 Kudos
2 Replies

Senior Contributor III  is worth reading.  The free sample chapter on 'pitfalls' of Make may help with your problem.

What is needed is two different Makefiles for the two projects (two different sets of .o's make it two projects) with one parent Makefile.  

0 Kudos

NXP TechSupport
NXP TechSupport

Hello Tom,

What about your project ? Could you please share it or show the steps and errors when you clean

and build .

I made a simple test on my side , build->clean->build. when clean the project, the .o files can

disappear , please have a look at my attachment .

Hope it helps

Have a great day,

Note: If this post answers your question, please click the Correct Answer button. Thank you!

0 Kudos