help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] What am I doing Wrong?


From: Oliver Jennrich
Subject: Re: [Help-gsl] What am I doing Wrong?
Date: Fri, 28 Sep 2007 15:46:26 +0200

On 9/24/07, neale hirsh <address@hidden> wrote:
> Dear Helpers
>
> I downloaded GSL for inclusion in an intended book. I am having
> difficulty making it work, and I hope somebody has a suggestion.
>
> GSL appears to compile properly on my Mac under OSX 10.4.10. The
> "configure", "make", and "make install" commands complete without error.

So far, so good. If you want to make sure that everything works as it
should, try a
'make -k check' as well (CAUTION: It might take a while to complete).

> Three variations of some statistical modules are created: e.g.,
> histogram.c,
> histogram.l, and histogram. Under the Unix command "ls -F", the
> latter module has an asterisk at the end (it's executable). But most
> modules like exponential.c do not have an executable version, and
> they do not execute.

On the risk that my limited understanding of OSX shows - you are aware
that gsl is a *library*? It has a few executables as well, but by and
large it is a library, intended to be linked against your code. BTW -
where do you find 'histogram.c'?

> I then try to compile modules separately. When I compile exponential.c,
> for example, the error message is "Undefined symbols detected; _xxx,
> _yyy, _zzz", where x-z are the names of every function in the module.
> In desperation, I modify the function names to begin with "_", but
> the error message is "Undefined symbols detected; __xxx" and so forth.

The 'undefined symbols'  are warnings from your linker - to get rid of
them you have to provide it with the right library to link against. If
you are using gcc, provide the -lgsl flag.

Having said that, it is relatively useless (and indeed impossible) to
compile something without a 'main' function into an executable.

If you want to take a look at code that uses the gsl, go into the
doc/exaples subdirectory of your gsl tree and have a look at the *.c
files. Most (all?) of them are intended to be compiled into
executables.



-- 
Space -- the final frontier




reply via email to

[Prev in Thread] Current Thread [Next in Thread]