Thread: using Gnu Scientific Library

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    30

    using Gnu Scientific Library

    I've just installed GSL, and I was reading the introduction and about including the appropriate directory for certain tasks (ie #include<gsl/gsl_sf_bessel.h>) it says
    "If the directory is not installed on the standard search path of your compiler you will also
    need to provide its location to the preprocessor as a command line flag."
    So I have the location, but how do I do this?
    If it told me, I didn't understand... Help appreciated.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    It depends on your compiler. For example, if you are using gcc 4.2 the relevant documentation to read would be Options for Directory Search.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    31
    Hello,

    Please tell how you installed GSL. Did you down the load source code and complete the standard, ./configure, make, sudo make install? Or did you use a package manager?

    Chances are that compiling with this will work (this assumes that GSL is install in /usr/lib or /usr/local/lib for a unix/linux type system).

    gcc -Wall main.c -lgsl -lcblas

    (where main.c is the name(s) of the file(s) that are to be complied.)
    Dan

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Gnu Scientific Library functions
    By zdream8 in forum C Programming
    Replies: 11
    Last Post: 06-09-2008, 09:37 AM
  2. GNU Scientific Library
    By aeldes1 in forum C Programming
    Replies: 4
    Last Post: 04-10-2008, 02:47 PM
  3. The GNU Scientific Library - nonlinear fitting
    By lechat in forum C++ Programming
    Replies: 0
    Last Post: 12-03-2007, 02:58 PM
  4. Installing GNU C Library
    By prthealien in forum Linux Programming
    Replies: 2
    Last Post: 08-26-2006, 10:19 AM
  5. Adding GNU scientific library to Dev C++
    By Jreifler in forum C++ Programming
    Replies: 1
    Last Post: 03-05-2004, 02:20 PM