help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] problems running GSL


From: Joakim Hove
Subject: Re: [Help-gsl] problems running GSL
Date: Mon, 26 Sep 2005 08:23:41 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux)

Nicolás Quesada <address@hidden> writes:

> Hi . I have a problem with GSL: when I try to make a program that uses
> any function defined in the package I receive this message in the shell:
>
> /tmp/ccxeGO35.o(.text+0x39): En la función `main':
> : undefined reference to `gsl_poly_complex_workspace_alloc'
> /tmp/ccxeGO35.o(.text+0x5a): En la función `main':
> : undefined reference to `gsl_poly_complex_solve'
> /tmp/ccxeGO35.o(.text+0x6b): En la función `main':
> : undefined reference to `gsl_poly_complex_workspace_free'
> collect2: ld returned 1 exit status
>
> when i try use the functions gsl_poly_complex_workspace_alloc and in
> general with all the functions of the gsl. I downloaded de rpm file.
> and the program don't compile.

Well, to me it seems that the program compiles OK, the object files
seem to be made, however it seems the compiler (linker) could not find
the gsl library when collecting everything into one executable. To get
more help you should show the commands you use to compile your
program, I guess an option: "-L/path/to/gsl/library" should do it.

If that helps, you (probably) have to tell the dynamic linker where to
find the gsl library as well, this is done with:

  o Adding a line to the the file /etc/ld.so.conf file

or

  o Setting the environment variable LD_LIBRARY_PATH

To test whether a dynamic executable will be ready to run you can use
the command ldd:

bash% ldd a.out

This will list all the dynamic libraries and where they are found (or
not found - in which case the program will fail sto start.)


>  this don't happend when I use constants like
> GSL_CONST_MKSA_SPEED_OF_LIGHT or things like that I have SUSE Linux
> 9.2 and gcc 3.3.4. and gsl 1.5-3.1

Well, these constants are defined in header files, and your compiler
obviously finds them, indicating that your installation is not
completely hosed.

Good luck

Joakim 

-- 
Joakim Hove
hove AT ntnu.no                    /    
Tlf: +47 (55 5)8 27 13            /     Stabburveien 18          
Fax: +47 (55 5)8 94 40           /      N-5231 Paradis           
http://www.ift.uib.no/~hove/    /       55 91 28 18 / 92 68 57 04





reply via email to

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