Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C Moderated > GSL woes
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 1032 of 1098
Post > Topic >>

GSL woes

by Zak <b.zarychta@[EMAIL PROTECTED] > Jan 12, 2008 at 07:01 PM

dear all,
the GSL help pages give a simple example to include a function from
the GSL libraries thus

     #include <stdio.h>
     #include <gsl/gsl_sf_bessel.h>

     int
     main (void)
     {
       double x = 5.0;
       double y = gsl_sf_bessel_J0 (x);
       printf ("J0(%g) = %.18e\n", x, y);
       return 0;
     }

to compile and link it says

"f 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. The default location of the gsl
directory is /usr/local/include/gsl. A typical compilation command for
a source file example.c with the GNU C compiler gcc is,

     $ gcc -Wall -I/usr/local/include -c example.c

This results in an object file example.o. The default include path for
gcc searches /usr/local/include automatically so the -I option can
actually be omitted when GSL is installed in its default location. "


This does not compile, also

     $ gcc -Wall -I/usr/include -c example.c

and
     $ gcc -Wall -I/usr/lib/ -c example.c

do not compile all with the error
gsl1.c:2:36: error: gsl/gsl_sf_bessel.h: No such file or directory
gsl1.c: In function 'main':
gsl1.c:8: warning: implicit declaration of function 'gsl_sf_bessel_J0'

Now on my debian box
$ find / -name gsl
/usr/include/gsl

but the gsl directory is empty. When I

$ locate gsl

i get, among other things

\snip
/usr/lib/libgslcblas.so.0
/usr/lib/libgslcblas.so.0.0.0
/usr/lib/libgsl.so.0
/usr/lib/libgsl.so.0.9.0
\snip

gsl is installed together with documentation using synaptic package
manager under
libgsl0
libgsl0ldbl
gsl-bin  (apparently with example binaries that i cannot find)
gsl-ref-html

At this point i'm out of idea's. i'm new to this and any help is
greatfully recieved
-- 
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
 -- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line.  Sorry.




 5 Posts in Topic:
GSL woes
Zak <b.zarychta@[EMAIL  2008-01-12 19:01:09 
Re: GSL woes
pa@[EMAIL PROTECTED] (Pi  2008-01-14 12:49:00 
Re: GSL woes
=?ISO-8859-1?Q?Hans-Bernh  2008-01-14 12:49:58 
Re: GSL woes
Jack Klein <jackklein@  2008-01-14 12:49:39 
Re: GSL woes
Jonathan Leffler <jlef  2008-01-14 12:50:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 18:38:32 CDT 2008.