using Gnu Scientific Library

This is a discussion on using Gnu Scientific Library within the C Programming forums, part of the General Programming Boards category; I've just installed GSL, and I was reading the introduction and about including the appropriate directory for certain tasks (ie ...

  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
    21,315
    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.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    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, 01: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, 01:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21