I think you need to link gslcblas as well. Using that I can compile your code without errors.
-Carl On Wed, Sep 9, 2009 at 8:16 PM, Emmanuel Kanterakis <[email protected]>wrote: > Hi all; > > I am trying to run this simple program using complex math in gsl. > I do link libgsl.a, however I get the error below. > > What am I doing wrong? > > Thank you in advance. > > Emmanuel > > > #include "stdio.h" > #include "stdlib.h" > #include "gsl/gsl_complex.h" > #include "gsl/gsl_complex_math.h" > > void main (){ > gsl_complex complex_number; > > GSL_SET_COMPLEX(&complex_number, 4, 0); > > complex_number = gsl_complex_inverse(complex_number); > > printf("%g,%g\n", GSL_REAL(complex_number), GSL_IMAG(complex_number)); > } > > > libgsl.a(complex_math.o) : error LNK2001: unresolved external symbol > _log1p > libgsl.a(sys_invhyp.o) : error LNK2001: unresolved external symbol _log1p > Debug/test_gsl_cmplx.exe : fatal error LNK1120: 1 unresolved externals > Error executing link.exe. > > test_gsl_cmplx.exe - 3 error(s), 0 warning(s) > _______________________________________________ > Help-gsl mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-gsl > -- Carl Boettiger Population Biology, UC Davis http://two.ucdavis.edu/~cboettig _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
