Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had to do this regularly, do as following :</p> <ul> <li>On the server, create one directory in your home directory to install the library (let's say <code>mypref</code>) and another one to build the library (let's say <code>tmp</code>). You have two new directories : <code>~/mypref</code> and <code>~/tmp</code>.</li> <li>Download GSL sources in <code>~/tmp</code> (last version is <a href="ftp://ftp.gnu.org/gnu/gsl/gsl-1.14.tar.gz" rel="noreferrer">ftp://ftp.gnu.org/gnu/gsl/gsl-1.14.tar.gz</a>), extract and go in the generated sub-directory (<code>gsl-1.14</code>) :</li> </ul> <p><code>cd ~/tmp</code><br> <code>wget ftp://ftp.gnu.org/gnu/gsl/gsl-1.14.tar.gz</code><br> <code>tar -xvzf gsl-1.14.tar.gz</code><br> <code>cd gsl-1.14</code></p> <ul> <li>Launch the <code>configure</code> script specifying <code>~/mypref</code> as the installation prefix (and maybe other options depending of your server) :</li> </ul> <p><code>./configure --prefix=${HOME}/mypref</code></p> <ul> <li>Make :</li> </ul> <p><code>make</code></p> <ul> <li>And install :</li> </ul> <p><code>make install</code></p> <ul> <li>Now you can remove safely the <code>~/tmp</code> directory :</li> </ul> <p><code>cd; rm -rf tmp</code></p> <p>Now you can compile your program using :</p> <p><code>g++ -o program main.cpp classOne.cpp classTwo.cpp -I${HOME}/mypref/include -lm -L${HOME}/mypref/lib -lgsl -lgslcblas</code></p> <p><code>-I</code> and <code>-L</code> indicate respectively the path for the headers and the library. If your program is meant to be executed in a context where your home directory is not visible, consider static linking :</p> <p><code>g++ -o program main.cpp classOne.cpp classTwo.cpp ${HOME}/mypref/lib/libgsl.a ${HOME}/mypref/lib/libgslcblas.a -I${HOME}/mypref/include -lm</code></p> <p>The binary produced by the last command is bigger than previously, but entirely independent from GSL and GSLCBLAS.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload