From owner-freebsd-questions Fri Jul 5 15:33:26 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA16733 for questions-outgoing; Fri, 5 Jul 1996 15:33:26 -0700 (PDT) Received: from po1.glue.umd.edu (po1.glue.umd.edu [129.2.128.44]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id PAA16728 for ; Fri, 5 Jul 1996 15:33:24 -0700 (PDT) Received: from downlink.eng.umd.edu (downlink.eng.umd.edu [129.2.98.182]) by po1.glue.umd.edu (8.7.5/8.7.3) with ESMTP id SAA01622; Fri, 5 Jul 1996 18:33:21 -0400 (EDT) Received: (from chuckr@localhost) by downlink.eng.umd.edu (8.7.5/8.7.3) id SAA14139; Fri, 5 Jul 1996 18:33:21 -0400 (EDT) Date: Fri, 5 Jul 1996 18:33:20 -0400 (EDT) From: Chuck Robey X-Sender: chuckr@downlink.eng.umd.edu To: Michael Searle cc: questions@freefall.freebsd.org Subject: Re: C libraries In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, 5 Jul 1996, Michael Searle wrote: > I have been having some problems getting C programs containing calls in > math.h to link - is there a special library I have to use? I wrote a test > program using sqrt(), but I get the same stuff for pow(), trig functions, > etc. I am using standard gcc 2.6.3 on FreeBSD 2.1R. Here is the test > program, the output I got from the linker, and my /usr/lib directory. > > It compiles and links OK, just using 'gcc sqrt.c -o sqrt', on a different > (not FreeBSD) system running gcc 2.4.5. > > Also, one of the programs also needed Motif (the Xm library) to compile. Is > there a free static version of the Motif library? (If so, where can I > download it from?) try linking with -lm, the math library. ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 9120 Edmonston Ct #302 | Greenbelt, MD 20770 | I run Journey2 and n3lxx, both FreeBSD (301) 220-2114 | version 2.2 current -- and great FUN! ----------------------------+-----------------------------------------------