Talk About Network

Google


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 > Re: GSL woes
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 5 Topic 1032 of 1134
Post > Topic >>

Re: GSL woes

by Jack Klein <jackklein@[EMAIL PROTECTED] > Jan 14, 2008 at 12:49 PM

On Sat, 12 Jan 2008 19:01:09 -0600 (CST), Zak
<b.zarychta@[EMAIL PROTECTED]
> wrote in comp.lang.c.moderated:

> 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 do***entation 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

Your problem has nothing at all to do with he C language, and
everything to do with your particular compiler, platform, the third
party, and the way the third party library is installed, apparently
incorrectly.

You seem to have verified the fact that there is no file named
gsl/gsl_sf_bessel.h installed on your computer.  In that case, there
is no possible way that you can tell your compiler how to find a file
with that name.

So what you need to do is find out a way to get this file, and
possible others that this package, somewhere on your computer.  Then
you can tell your compiler how to find them.

To find out how to get these files on your computer, you need to check
the source where you got the package, or perhaps ask in a group for
your system, such as news:comp.os.linux.development.apps.

It is absolutely certain that the C language standard does not specify
anything about third-party libraries.

-- 
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.para****ft.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
-- 
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 Fri Jul 25 21:22:02 CDT 2008.