# Makefile Garfield

**URL:** <https://root-forum.cern.ch/t/makefile-garfield/17475>\
**Category:** Garfield++\
**Created:** [April 7, 2014, 1:03pm UTC](https://root-forum.cern.ch/t/makefile-garfield/17475 "2014-04-07T13:03:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [January 31, 2017, 9:39am UTC](https://root-forum.cern.ch/t/makefile-garfield/17475/3 "2017-01-31T09:39:31Z")

</div>

Try:

```auto
g++ `root-config --cflags` -o gemseq1 gemseq1.o $(GARFIELD_HOME)/Library/libGarfield.a `root-config --glibs` -lgfortran -lm -lz

```

or:

```auto
g++ `root-config --ldflags` -o gemseq1 gemseq1.o $(GARFIELD_HOME)/Library/libGarfield.a `root-config --glibs` -lgfortran -lm -lz

```

---

_[View the full topic](https://root-forum.cern.ch/t/makefile-garfield/17475)._
