Optimization and flags for making a static library with g++

前端 未结 5 1578
一整个雨季
一整个雨季 2021-01-30 01:53

I am just starting with g++ compiler on Linux and got some questions on the compiler flags. Here are they

Optimizations

I read about optimizatio

5条回答
  •  孤独总比滥情好
    2021-01-30 02:32

    In regards to the Static library question the answer given by David Cournapeau is correct but you can alternatively use the 's' flag with 'ar' rather than running ranlib on your static library file. The 'ar' manual page states that

    Running ar s on an archive is equivalent to running ranlib on it.

    Whichever method you use is just a matter of personal preference.

提交回复
热议问题