[gambit-list] Undefined symbol in c-lambda

Joel J. Adamson adamsonj at email.unc.edu
Wed Jun 25 22:56:20 EDT 2008


Christian Jaeger <christian at pflanze.mine.nu> writes:

> Joel J. Adamson wrote:
>> /home/joel/lisp/scm/genxic/gsl_genx> gsi gsl_genx
>> *** ERROR IN ##main -- /home/joel/lisp/scm/genxic/gsl_genx/gsl_genx.o11:
>> undefined symbol: gsl_matrix_get_row
>> (load "gsl_genx")
>>   
>
> ...
>
>> Now, the obvious problem is that the symbol *is* defined in
>> gsl/gsl_matrix.h.  If I comment the function that uses
>> gsl_matrix_get_row, then the next one comes up with the same error.
>> I've looked at the resulting C file (gsc -c gsl_genx.scm), and
>> gsl_genx.h is included.  What am I missing here?

> When load complains about an undefined symbol, it's really the dynamic
> linker. It is complaining about a C function/variable the object file
> is requiring, and which the dynamic linker is trying to resolve, but
> cannot find a match; this usually means that (a dependency of the
> object file is not loaded already and) that the object file has been
> compiled without giving gcc -l flags so that it integrates the
> relevant info for loading the dependencies automatically. I think you
> are missing some flag along the lines of "-ld-options -lgsl" to your
> gsc invocation.

Bingo!

I now remember that I had those options before (when it worked).  I
needed "-lgsl -lgslcblas".  Now it works.

Thanks
Joel
-- 
Joel J. Adamson
(303) 880-3109
Public key: http://pgp.mit.edu
http://www.unc.edu/~adamsonj
http://trashbird1240.blogspot.com



More information about the Gambit-list mailing list