help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] Undefined reference with Cygwin GSL


From: AJ Bostian
Subject: [Help-gsl] Undefined reference with Cygwin GSL
Date: Sat, 20 Mar 2004 15:37:44 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

I wrote a program to do some statistical analysis which works OK under the i386-linux version of gsl-1.4 but not the cygwin version. The structure of the program is as follows:

// myProgram.cc
//
#include "myOtherLib.cc"

int main(void) {
    ...
    price = GetThePrice(X)
    ...
}


// myOtherLib.cc
//
// #include <gsl/gsl_errno.h>
// #include <gsl/gsl_cdf.h>
//

// double GetThePrice(double X) {
    ...
    prob = gsl_cdf_ugaussian_P(X);
    ...
}

I compile using gcc-3.3.1 with the command
g++ -Wall -lgsl -lgslcblas -lm myProgram.cc

On my Redhat-8 machine, I get a successful compile and everything works great. On my Cygwin machine, I get the error

/cygdrive/c/temp/ccvDaNBM.o(.text+0xc6):myProgram.cc undefined reference to '_gsl_cdf_ugaussian_P'
collect2: ld returned exit 1 status

I added -I/usr/include to the compile command (just in case) and nothing changed. (Plus, I can't figure out why ther's an interpolated leading underscore.) Any help is much appreciated.

Thanks,
AJ Bostian




reply via email to

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