On 9/27/06, boufflet <[EMAIL PROTECTED]> wrote:

[EMAIL PROTECTED] ~]$ gcc gsl_try.c -o gsl_try
/tmp/ccgTr3Jx.o(.text+0x24): In function `main':
gsl_try.c: undefined reference to `gsl_matrix_alloc'
collect2: ld a retourné 1 code d'état d'exécution

Since you're calling a linker here, you need to tell it to link
against the GSL library.  An easy way to do this is:

 gcc -o gsl_try gsl_try.c `gsl-config --cflags --libs`

We get no error while using the '-c' option as:
[EMAIL PROTECTED] ~]$ gcc -c gsl_try.c

You don't get a linker error here because you're only invoking the
compiler, not the linker.

HTH,
-- mj


_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to