Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!ll-xn!mit-eddie!genrad!decvax!decwrl!amdcad!amd!pesnta!peora!codas!cuae2!djmolny From: djmolny@cuae2.UUCP Newsgroups: net.unix Subject: Re: System V C Math Routines Message-ID: <3042@cuae2.UUCP> Date: Wed, 22-Oct-86 09:24:43 EDT Article-I.D.: cuae2.3042 Posted: Wed Oct 22 09:24:43 1986 Date-Received: Thu, 23-Oct-86 02:35:24 EDT References: <7968ZSR@PSUVMB> Sender: usenet@cuae2.UUCP Reply-To: djmolny@cuae2.UUCP (-DJ Molny) Organization: AT&T - /app/eng, Lisle, IL Lines: 31 > Has anyone out there had any trouble using the Math library from AT&T >C language on a 3B(5)? I #include math.h and the linker complains (as it >should) when I cc. Then I compile without linking and link separatly while >including the library libm.a (-lm) and it still complains. My program is a >simple test that uses the sin() and cos() functions, but these are always >said to be undefined by the linker. I even tried to link the library's >filename explicitly, copied it into a file called math.o and linked that >explicitly (all the while making sure to link the C library). No luck. >How is one supposed to use the math routines from C? I know that I'm >labeling myself as a novice, but darn it I can't get anything to work. > ... The math library definitely works correctly on the 3B5. Be sure the -lm option is the last thing on the command line when you link, and be sure to use the -f option as well. An example: cc -f -o simple simple.c -lm If you can't get this to work, send me a copy of your source file and the *exact* error messages you get, and I will take a look at it. -- Regards, DJ Molny N9609U ihnp4!cuae2!djmolny