Date: Mon, 24 May 93 13:53:49 EDT From: DJ Delorie To: tesla AT lamar DOT colostate DOT edu Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Using the Complex class > 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 This is a fun one. You need to do it like this: gcc [.c .o .a] -lgcc -lm The "-lgcc" is where the C++ classes are. The C++ class uses sin(), which is in libm.a.