Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is it possible to create a static library directly using 'gcc' command?

To create a static library, in general, we follow the 2-step method. First, we create object files for each source file using the ‘gcc‘ command. Second, We will bundle all the object files using the ‘ar‘ command.

I know ‘gcc’ and ‘ar’ are two separate components. But, I would like to get the confirmation on whether it is possible to create a static library in a single step using the ‘gcc’ command?
If yes, Could anyone suggest how we can do that?

Note: This question is not related to how to create a static library. This question is purely to get confirmation. I referred gcc manual entry page but I couldn’t find a way to do that.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Let me know your thoughts on this.

>Solution :

There is no way to create the archive library using gcc only.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading