🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: crl.general
Article #8

Re: Problem with C for the mathematical programm

#8
From: Ross Wilson
Date: Thu, 01 Feb 1996 23:41
24 lines
1038 bytes
sorkin@crl.com (Iouri Sorkine) wrote:


>I execute "cc name.c" and receive "ld: Undefined symbol
>                                       _cos
>                                       _sin
>and so on...                                ". 
>What's wrong?        

You will need to include the math library.  How you do this depends on
what operating system and/or compiler you are using.

If you use UNIX, do:

	cc -lm name.c

If you use Borland, Microsoft, whatever, you will have to read the
manual.

Don't forget to #include <math.h>.

Hope this helps,

Ross
Technical Details
Message-ID: <4erfj5$f5c@canb.cin.gov.au>
Path: arc1-ca.pugleaf.net!newshost.cin.gov.au!usenet
References: <4epq2e$h4b@crl2.crl.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!newshost.cin.gov.au!usenet
From: rossw@cin.gov.au (Ross Wilson)
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: Thu, 01 Feb 1996 23:41:56 GMT
Organization: Community Information Network
Message-ID: <4erfj5$f5c@canb.cin.gov.au>
References: <4epq2e$h4b@crl2.crl.com>
NNTP-Posting-Host: chico.cin.gov.au
X-Newsreader: Forte Free Agent 1.0.82