🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: crl.general
Article #7

Re: Problem with C for the mathematical programm

#7
From: Gordon Royle
Date: Thu, 01 Feb 1996 14:52
25 lines
882 bytes
sorkin@crl.com (Iouri Sorkine) writes:


>I execute "cc name.c" and receive "ld: Undefined symbol
>                                       _cos
>                                       _sin

Need to include the math libraries.

Put

#include <math.h>

in your program

and compile with

cc name.c -lm


gordon
-- 
Gordon Royle ---- gordon@cs.uwa.edu.au
Visit http://www.cs.uwa.edu.au/~gordon
--
Technical Details
Message-ID: <gordon.823186324@cs.uwa.edu.au>
Path: arc1-ca.pugleaf.net!cs.uwa.edu.au!gordon
References: <4epq2e$h4b@crl2.crl.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cs.uwa.edu.au!gordon
From: gordon@cs.uwa.edu.au (Gordon Royle)
Newsgroups: crl.general,comp.sys.sun.misc,comp.unix.sys5.misc,comp.lang.c,sci.math
Subject: Re: Problem with C for the mathematical programm
Date: 1 Feb 96 14:52:04 GMT
Organization: The University of Western Australia
Message-ID: <gordon.823186324@cs.uwa.edu.au>
References: <4epq2e$h4b@crl2.crl.com>
NNTP-Posting-Host: wallaroo.cs.uwa.oz.au
X-Newsreader: NN version 6.5.0 #3 (NOV)