0

When I am compiling code using GCC, it is giving two outputs .o and .d file. While creating library(.a) do I need to add(.d) files also. If yes then how?

1
  • gcc usually gives only one output .o. You agglomerate these with ar Commented Nov 4, 2014 at 19:39

1 Answer 1

1

No you only need to add the .o file, a static library archive is just a collection of .o files.

The .d file is a makefile fragment for specifying the dependencies used to build the object file, and is only needed when you are compiling the .o file itself.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.