From mboxrd@z Thu Jan 1 00:00:00 1970 From: Abraham David Smith To: gsl-discuss@sources.redhat.com Subject: gsl_complex_rect undefined? Date: Tue, 18 Dec 2001 09:30:00 -0000 Message-ID: <20011218113006.A22589@euclid.dsl.wisc.edu> X-SW-Source: 2001-q4/msg00159.html Message-ID: <20011218093000.qY1ksVSskA_zs06L3vbbiskCL3kRGDIBRJJXewwlbWo@z> I am trying to use GSL 1.0 on an ix86 running an essentially normal RedHat Linux 7.1 installation (with all of RedHat's published patches applied to gcc, etc). Consider the following code snippet: #include #include void main() { gsl_complex a = gsl_complex_rect(1.0,2.0); cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl; GSL_SET_COMPLEX (&a, 3.0, 4.0); cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl; } Compiling this with g++ gives: testcomplex.cpp: In function `int main (...)': testcomplex.cpp:9: `gsl_complex_rect' undeclared (first use this function) testcomplex.cpp:9: (Each undeclared identifier is reported only once for each function it appears in.) now consider the snippet: #include #include void main() { gsl_complex a; cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl; GSL_SET_COMPLEX (&a, 3.0, 4.0); cout << GSL_REAL(a) << ", " << GSL_IMAG(a) << endl; } this compiles and gives: 2.10391, 7.02217 3, 4 According to page 18 of the GSL manual [ http://sources.redhat.com/gsl/ref/gsl-ref_5.html#SEC34 ], the function gsl_complex_rect should be defined. What's up here? -- # Abraham David Smith UW--Madison Mathematics/Physics Undergraduate [*] # # Y!:abrahamdavidsmith AOL-IM:abrahamsmith # # http://euclid.dsl.wisc.edu/~abe Molon Labe! Defend your rights! # # [*]: The views I express are not necessarily those of the UW--Madison, etc. #