Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use *.o and *.d files?

I ma trying to run examples using a library. In the documentation to the library it is written that I need to copy all the files into my directory and than type make. After that I need to go to the "Debug" folder and type ./lib_examples to run the examples.

I performed this sequence. As a result I have a lot of *.o and *.d files in the "Debug" subdirectory. Among them there is lib_examples.o and lib_examples.h files. But there is no lib_example file that I am supposed to execute.

Does anybody know what was supposed to happen and where it went wrong. Should I do one more step to be able to use *.o and *.d files?

like image 903
Roman Avatar asked Mar 18 '13 15:03

Roman


1 Answers

The ".o" files are likely intermediate files from which the actual executable program should have been created.

The ".d" files are likely internal state used by the makefile, only important if you are making changes to the source code and then rebuilding "incrementally".

If, after running make, you have only these files but not the executable file, then the most likely explanation is that make encountered an error in creating the executable. If that's the case, then the last few lines of output generated by make should tell you more.

like image 144
slowdog Avatar answered Oct 16 '22 16:10

slowdog