# GSL, ROOT and Windows

**URL:** <https://root-forum.cern.ch/t/gsl-root-and-windows/5663>\
**Category:** ROOT\
**Created:** [November 21, 2007, 12:09pm UTC](https://root-forum.cern.ch/t/gsl-root-and-windows/5663 "2007-11-21T12:09:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jada](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@jada](https://root-forum.cern.ch/u/jada)\
**Post date:** [November 21, 2007, 12:09pm UTC](https://root-forum.cern.ch/t/gsl-root-and-windows/5663/1 "2007-11-21T12:09:17Z")

</div>

Hello,

I am using ROOT 5.17 with Windows XP and I would like to use the function Erfc in my program. Even if I have included the library Math/SpecFunc.h, I am told that my function ROOT::Math::erfc() is declared but not defined.  
I think it may be because ROOT does not include the gsl library. Indeed, when I tried to include gsl/gsl\_sf\_erf.h, I am told that it is also not defined.  
Thus, my question is, how can I add the gsl library to ROOT with Windows XP ? I precise that I don’t have Cygwin.

Cheers,  
JadA

---

<div class="post-metadata">

**Author:** ![brun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b9e5f3/32.png) [@brun](https://root-forum.cern.ch/u/brun)\
**Post date:** [November 21, 2007, 3:01pm UTC](https://root-forum.cern.ch/t/gsl-root-and-windows/5663/2 "2007-11-21T15:01:09Z")

</div>

`root [0] gSystem.Load("libMathCore")
root [1] ROOT::Math::erfc(0.5)
(double)4.79500122186953481e-01
`

Rene

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [November 21, 2007, 3:32pm UTC](https://root-forum.cern.ch/t/gsl-root-and-windows/5663/3 "2007-11-21T15:32:15Z")

</div>

The problem, which is fixed in the svn trunk version, is due to include the file  
Math/SpecFunc.h before using the function in CINT.  
Do not therefore include the file when using CINT. Do in your macro:

#ifndef **CINT**  
#include "Math/SpecFunc.h  
#endif

For the erfc function, GSL is not needed. However it is needed for other math functions from MathMore. In that case, there are some sites offering GSL binaries for Windows compiled using Visual Studio.  
For example, for the latest version, 1.10, the one I use is from

[david.geldreich.free.fr/dev.html](http://david.geldreich.free.fr/dev.html)

Cheers

Lorenzo
