Date: Fri, 21 May 1993 07:58:52 -0600 From: tesla AT lamar DOT ColoState DOT EDU (Jon Nash) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Using the Complex class Hello, I have hesitated to ask this question for some time because it seemed to trivial. After spending several hours of frustration I've decided that it isn't that trivial afterall and I'ld like to request a little help! I have written a small test program: #include #include #include int main(void) { Complex x(1.0,2.0),y(2.0,3.0),z; //oops use z(0,0)... z=x+y; cout << z.real(); } When I compile this with Borland C/C++ it does fine. When I compile this with GCC I get errors: complex.o: undefined symbol _sin referenced in text segment... or something like that. (The compilation line that I use is gcc XXX.cc -lm -oXXX I am new to C++... What am I doing wrong!? Thanks in advance. Jon Nash Tesla AT Lamar DOT ColoState DOT EDU