Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jul 1996 18:33:20 -0400 (EDT)
From:      Chuck Robey <chuckr@Glue.umd.edu>
To:        Michael Searle <searle@longacre.demon.co.uk>
Cc:        questions@freefall.freebsd.org
Subject:   Re: C libraries
Message-ID:  <Pine.OSF.3.91.960705183019.13527C-100000@downlink.eng.umd.edu>
In-Reply-To: <mE9178E39@longacre.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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!
----------------------------+-----------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.91.960705183019.13527C-100000>