[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] Potential bug for gsl documentation
From: |
Michael Rockinger |
Subject: |
[Bug-gsl] Potential bug for gsl documentation |
Date: |
Sun, 17 Oct 2010 17:44:19 +0200 |
Dear Sir:
I am relatively new to Unix and C so maybe the following is totally stupid
(on the other hand if I do not proceed in this manner, I cannot use the
library, if I do it works :-)). I work on a Mac Darwin 9.8.0.
My mail pertains to the reference pdf file, page 5 or to the page
http://www.gnu.org/software/gsl/manual/html_node/Linking-programs-with-the-library.html
it is mentioned that one should link using
$ gcc -L/usr/local/lib example.o -lgsl -lgslcblas -lm
my problem is that systematically, gcc tells me that the library -lm
does not exist :-(.
After removal of the last 3 letters -lm, everything works !!
Also, it may be somewhat pedagogical to state for newcomers that one
should execute the file a.out. using ./a.out. With my naiveté I
thought I should chmod a+x file.o and
then ./file.o. Clearly, this shows my ignorance, but it would be
useful for newbies of gcc.
Last, now I run a unix script file (doIt.sh) such as
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
gcc -Wall -I/usr/local/include -c Try3.c
gcc -L/usr/local/lib Try3.o -lgsl -lgslcblas
./a.out
I think if such a file would have been suggested in the manual, it
would simply summarize the instructions required to fully compile,
link and run a program.
After three days "working" with gls, I have the impression that it is
great stuff, the idea of gnu is great.
I believe, however, that many potential users are scared away from the
lack of unfriendliness of the documentation. Not much is missing to
make it really a great project.
I apologise for taking your time if what I wrote seems totally stupid to you.
Best
Michael Rockinger
Prof, Univ Lausanne
- [Bug-gsl] Potential bug for gsl documentation,
Michael Rockinger <=