[Top][All Lists]

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

[Help-gsl] RE: linker error

From: César Cárdenas
Subject: [Help-gsl] RE: linker error
Date: Mon, 10 May 2004 10:57:47 +0200

I apologize because my mistake on not mentioning the platform and tools
I am using, here you have:

Dev-cpp under Windows 2000 v5.00.2195

Default compiler:

$(CC) -c gsl1.c -o gsl1.o $(CFLAGS)

Many thanks for your help,
César Cárdenas

>-- Mensaje Original --
>Date: Fri, 7 May 2004 16:55:58 +0200
>From: César Cárdenas <address@hidden>
>Subject: linker error
>Reply-To: address@hidden
>To: address@hidden
>Dear all:
I am doing the following simple example statistics program:

#include <stdio.h>
#include <gsl/gsl_statistics.h>

int main (void)
    double data[5] = {17.5, 18.1, 16.5, 18.3, 12.6};
>mean, variance, largest, smallest;

    mean = gsl_statistics_mean (data, 1, 5);
    variance = gsl_statistics_variance (data, 1, 5);
    largest = gsl_statistics_max (data, 1, 5);
    smallest = gsl_statistics_min (data, 1, 5);

    printf ("Th
> dataset is %g, %g, %g, %g, %g\n", data[0], data[1], data[2],
data[3], data[4]);

    printf ("The sample mean is %g\n", mean);
    printf ("The sample variance is %g\n", variance);
    printf ("The largest value is %g\n", largest);
    printf ("
>he smallest value is %g\n", smallest);
    return 0;

The compiling process messages are:

[Linker error] undefined reference to 'gsl_statistics_...'

for each function "gsl_..." in the program.

I al
>eady verified including libraries and I believe the problem is on *.a
or *.o or *.lib files but when extracted "gsl-1.4.tar.gzip" it does not
appear any *.a or *.o or *.lib file...

I really appreciate any help for compiling and running this exampl
>, have
a nice weekend.
César Cárdenas

reply via email to

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