# Undefined reference to \`ROOT::Math::GSLMinimizer::GSLMinimizer(ROOT::Math::EGSLMinimizerType)

**URL:** <https://root-forum.cern.ch/t/undefined-reference-to-root-gslminimizer-root-egslminimizertype/48322>\
**Category:** ROOT\
**Tags:** math\
**Created:** [January 10, 2022, 8:01am UTC](https://root-forum.cern.ch/t/undefined-reference-to-root-gslminimizer-root-egslminimizertype/48322 "2022-01-10T08:01:44Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [January 10, 2022, 10:48am UTC](https://root-forum.cern.ch/t/undefined-reference-to-root-gslminimizer-root-egslminimizertype/48322/11 "2022-01-10T10:48:55Z")

</div>

Don’t replace `root-config --libs`. Try with:

```auto
`root-config --cxx --cflags` -fPIC -w -g -o DoUnfolding DoUnfolding.C -L./src/ ... `root-config --libs` -lMinuit -lMathMore

```

see for example [Using ROOT in a c++ code - #2 by Wile\_E\_Coyote](https://root-forum.cern.ch/t/using-root-in-a-c-code/48257/2)

---

_[View the full topic](https://root-forum.cern.ch/t/undefined-reference-to-root-gslminimizer-root-egslminimizertype/48322)._
