Article View: gnu.gcc.help
Article #42037Re: libm.a problem
From: Christopher Sawtell
Date: Wed, 17 Jan 1996 00:00
Date: Wed, 17 Jan 1996 00:00
28 lines
1358 bytes
1358 bytes
Thomas Junier (tjunier@ulys.unil.ch) wrote:
: I got a problem with the pow() function. Say I have the following file
: named powtest.c
: #include <stdio.h>
: #include <math.h>
: void main() {
: double d = pow(2, 3);
: printf("%f\n", d);
: }
: $ gcc -lm powtest.c
Do it like this:-
$ gcc powtest.c -lm
--
+-----------------------------------------------------------------------+
| NAME Christopher Sawtell |
| SNAIL 215 Ollivier's Road, Linwood, Christchurch, 8001. New Zealand. |
| EMAIL chris@gerty.southern.co.nz |
| The Notes for C Programmers are available from:- |
| `ftp://svr-ftp.eng.cam.ac.uk/misc/sawtell_C.shar' |
| or `ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tgz' |
+-----------------------------------------------------------------------+
Technical Details
Message-ID:
<DLB7Cq.1o8@gerty.southern.co.nz>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<tjunier-1601961300180001@macc-roux313a.unil.ch>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,6375919e9dc5833d,start X-Google-Attributes: gid11318c,public From: chris@gerty.southern.co.nz (Christopher Sawtell) Subject: Re: libm.a problem Date: 1996/01/17 Message-ID: <DLB7Cq.1o8@gerty.southern.co.nz> X-Deja-AN: 135619088 references: <tjunier-1601961300180001@macc-roux313a.unil.ch> organization: Cogicorp newsgroups: gnu.gcc.help