# Find which lib to link against

**URL:** <https://root-forum.cern.ch/t/find-which-lib-to-link-against/64817>\
**Category:** Newbie\
**Created:** [April 24, 2026, 6:09am UTC](https://root-forum.cern.ch/t/find-which-lib-to-link-against/64817 "2026-04-24T06:09:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mael15](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/ecc23a/32.png) [@mael15](https://root-forum.cern.ch/u/mael15)\
**Post date:** [April 24, 2026, 6:09am UTC](https://root-forum.cern.ch/t/find-which-lib-to-link-against/64817/1 "2026-04-24T06:09:36Z")

</div>

* * *

_I want to use root in my c++ app and cannot find info on which .lib file to link against?_

For example: I want to use TFile and see in the first line of TFile.h that is is part of the IO library. I happened to guess correctly that I have to link against libRIO.lib because there is “io” in the file name. But is there some way to not have to guess? Cause there are 126 .lib files.

Thanx!

---

<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:** [April 24, 2026, 6:16am UTC](https://root-forum.cern.ch/t/find-which-lib-to-link-against/64817/2 "2026-04-24T06:16:49Z")

</div>

> [@How to dump modulemap ".pcm" files](https://root-forum.cern.ch/t/how-to-dump-modulemap-pcm-files/39935/23):
>
> Just for the completeness of this thread … For (almost) all ROOT classes, somewhere in the middle of the [ROOT “Class Reference” web pages](https://root.cern/doc/master/classes.html), right before the “Inheritance diagram for ...:” graph (right before the “Member, Constructor, ..., Documentation” sections), one can find the information which “#include” files are needed. Starting with ROOT 6.12, at the bottom of these web pages, one can find the “Libraries for ...:” graph, which shows the library to link and its dependencies. For an exam…

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [April 24, 2026, 6:53am UTC](https://root-forum.cern.ch/t/find-which-lib-to-link-against/64817/3 "2026-04-24T06:53:14Z")

</div>

Yes, as Wile said, scroll to the very bottom of `https://root.cern.ch/doc/master/classTFile.html`

or whatever class you are looking for:

`https://root.cern.ch/doc/master/class<TClassIAmLookingFor>.html`

and you’ll find the graph there with the library in the center.

---

<div class="post-metadata">

**Author:** ![mael15](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/ecc23a/32.png) [@mael15](https://root-forum.cern.ch/u/mael15)\
**Post date:** [April 24, 2026, 7:21am UTC](https://root-forum.cern.ch/t/find-which-lib-to-link-against/64817/4 "2026-04-24T07:21:31Z")

</div>

Aaaaaaaaaah, hard to find, thank you!
