# Compilation warning when use Garfield++

**URL:** <https://root-forum.cern.ch/t/compilation-warning-when-use-garfield/50615>\
**Category:** Garfield++\
**Created:** [June 30, 2022, 1:13pm UTC](https://root-forum.cern.ch/t/compilation-warning-when-use-garfield/50615 "2022-06-30T13:13:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [June 30, 2022, 1:13pm UTC](https://root-forum.cern.ch/t/compilation-warning-when-use-garfield/50615/1 "2022-06-30T13:13:30Z")

</div>

Dear experts

I always get the same warning when compile with garfield++, which is

```auto
ld: warning: dylib (/Users/siyuan/Physics/garfield/install/lib/libmagboltz.11.dylib) was built for newer macOS version (12.3) than being linked (12.0)

```

I tried to reinstall but this still exists. How can I get rid of this warning?

---

<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:** [June 30, 2022, 1:26pm UTC](https://root-forum.cern.ch/t/compilation-warning-when-use-garfield/50615/2 "2022-06-30T13:26:46Z")

</div>

@hschindl can help you with this question.

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [June 30, 2022, 7:05pm UTC](https://root-forum.cern.ch/t/compilation-warning-when-use-garfield/50615/3 "2022-06-30T19:05:48Z")

</div>

Not sure… Are your versions of gfortran and Xcode command line tools compatible?

---

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [July 1, 2022, 1:49am UTC](https://root-forum.cern.ch/t/compilation-warning-when-use-garfield/50615/4 "2022-07-01T01:49:07Z")

</div>

I searched on google and found a solution,

```auto
sudo xcode-select --switch /Applications/Xcode.app

```

it solved…

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [July 15, 2022, 1:49am UTC](https://root-forum.cern.ch/t/compilation-warning-when-use-garfield/50615/5 "2022-07-15T01:49:18Z")

</div>

Closed on July 15, 2022, 1:49am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
