# ROOT install on MacOs 15.1.1 XCode 16.1 Old Mac Intel Core I9

**URL:** <https://root-forum.cern.ch/t/root-install-on-macos-15-1-1-xcode-16-1-old-mac-intel-core-i9/62407>\
**Category:** Newbie\
**Created:** [December 6, 2024, 8:06am UTC](https://root-forum.cern.ch/t/root-install-on-macos-15-1-1-xcode-16-1-old-mac-intel-core-i9/62407 "2024-12-06T08:06:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hk\_kirill](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hk\_kirill](https://root-forum.cern.ch/u/hk_kirill)\
**Post date:** [December 6, 2024, 8:06am UTC](https://root-forum.cern.ch/t/root-install-on-macos-15-1-1-xcode-16-1-old-mac-intel-core-i9/62407/1 "2024-12-06T08:06:27Z")

</div>

Hello,

I have installed root using homebrew. Root basics work, but trying to compile an app using root libraries produces the error below. It looks that it tries to use an ancient version of g++, but not the one provided by Xcode line tools. Below are the paths and error…

Many thanks,

Kirill

```auto
OOT_Exercises % echo $LD_LIBRARY_PATH                                             
/usr/local/Cellar/root/6.32.08/lib/root
kprok@MacBook-Pro-324 ROOT_Exercises % echo $PATH                                                        
/usr/local/Cellar/root/6.32.08/bin:/usr/local/bin:/usr/local/sbin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/TeX/texbin
kprok@MacBook-Pro-324 ROOT_Exercises % g++ demo_1.cxx $(root-config --glibs --cflags --libs) -o demo_1
g++: error: unrecognized command line option ‘-stdlib=libc++’
g++: error: unrecognized command line option ‘-stdlib=libc++’
g++: error: unrecognized command line option ‘-std=c++17’

```

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [December 6, 2024, 8:21am UTC](https://root-forum.cern.ch/t/root-install-on-macos-15-1-1-xcode-16-1-old-mac-intel-core-i9/62407/2 "2024-12-06T08:21:52Z")

</div>

Welcome to the ROOT forum.

Usually a simple way to build your own application is:

```auto
`root-config --cxx` -o demo_1 demo_1.cxx -std=c++14 -O2

```

---

<div class="post-metadata">

**Author:** ![hk\_kirill](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hk\_kirill](https://root-forum.cern.ch/u/hk_kirill)\
**Post date:** [December 6, 2024, 8:27am UTC](https://root-forum.cern.ch/t/root-install-on-macos-15-1-1-xcode-16-1-old-mac-intel-core-i9/62407/3 "2024-12-06T08:27:07Z")

</div>

> [@couet](#):
>
> ``root-config --cxx` -o demo_1 demo_1.cxx -std=c++14 -O2`

Thanks! But still seems to have a problem finding libs:

`root-config --cxx` -o demo\_1 demo\_1.cxx -std=c++14 -O2  
demo\_1.cxx:1:10: fatal error: ‘TF1.h’ file not found  
1 | #include “TF1.h”  
| ^ ~~~~~~

---

<div class="post-metadata">

**Author:** ![hk\_kirill](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hk\_kirill](https://root-forum.cern.ch/u/hk_kirill)\
**Post date:** [December 6, 2024, 8:33am UTC](https://root-forum.cern.ch/t/root-install-on-macos-15-1-1-xcode-16-1-old-mac-intel-core-i9/62407/4 "2024-12-06T08:33:10Z")

</div>

looks like it wants c++17?

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [December 6, 2024, 8:40am UTC](https://root-forum.cern.ch/t/root-install-on-macos-15-1-1-xcode-16-1-old-mac-intel-core-i9/62407/5 "2024-12-06T08:40:33Z")

</div>

yes you can change to 17.  
did you run `source $ROOTSYS/bin/thisroot.sh` ? I guess yes because you said ROOT is working. In that case it is weird that the include files are not found.

---

<div class="post-metadata">

**Author:** ![hk\_kirill](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hk\_kirill](https://root-forum.cern.ch/u/hk_kirill)\
**Post date:** [December 6, 2024, 8:42am UTC](https://root-forum.cern.ch/t/root-install-on-macos-15-1-1-xcode-16-1-old-mac-intel-core-i9/62407/6 "2024-12-06T08:42:07Z")

</div>

yes, you can see the path in the examples above, so it seems strange to me, Do not remember such problems in previous versions, but I didn’t do it for some time…

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [December 6, 2024, 8:51am UTC](https://root-forum.cern.ch/t/root-install-on-macos-15-1-1-xcode-16-1-old-mac-intel-core-i9/62407/7 "2024-12-06T08:51:01Z")

</div>

It works for me, but I am not exactly in the same condition:

- I am using the Xcode command line tools
- I do not use brew
- I compile ROOT myself.
