Regenerating .o files

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Regenerating .o files

1,212件の閲覧回数
tomcarney
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?

Thanks

Tom

0 件の賞賛
返信
2 返答(返信)

1,148件の閲覧回数
bobpaddock
Senior Contributor IV

https://www.nostarch.com/gnumake/  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 件の賞賛
返信

1,148件の閲覧回数
Alice_Yang
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,
TIC

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

0 件の賞賛
返信