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.
Let me know your thoughts on this.