# Problem with gcc flag/file order when compiling against ROOT libraries

**URL:** <https://root-forum.cern.ch/t/problem-with-gcc-flag-file-order-when-compiling-against-root-libraries/36684>\
**Category:** ROOT\
**Created:** [November 5, 2019, 9:52am UTC](https://root-forum.cern.ch/t/problem-with-gcc-flag-file-order-when-compiling-against-root-libraries/36684 "2019-11-05T09:52:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [November 5, 2019, 10:41am UTC](https://root-forum.cern.ch/t/problem-with-gcc-flag-file-order-when-compiling-against-root-libraries/36684/2 "2019-11-05T10:41:50Z")

</div>

Search for “`--as-needed`” in [man ld -\> Command Line Options](https://sourceware.org/binutils/docs/ld/Options.html)

---

_[View the full topic](https://root-forum.cern.ch/t/problem-with-gcc-flag-file-order-when-compiling-against-root-libraries/36684)._
