🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #46669

sqrt

#46669
From: George Mansoor
Date: Thu, 03 Nov 1994 03:07
28 lines
1268 bytes
Can someone please help me?  I'm trying to compile and link a program that has
the sqrt function in it.  It compiles ok, but it gives me the error:

  /bin/ld: Unsatisfied symbols:
       sqrtf (code)
  collect: ld returned 1 exit status

I have included math.h and float.h.  I have also tried compiling like this

   gcc foo.c -o foo -lm

and

   gcc foo.c -o foo -lmath

What can I do?  

Any help greatly appreciated.




 --
--------------------------------------------------------------------------
George Mansoor                                        Cal State Northridge
Internet : gmansoor@csun.edu               Business Affairs Systems - BMGT
					       		      818.885.4509
Technical Details
Message-ID: <399k59$rk3@nic-nac.CSU.net>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!usc!nic-nac.CSU.net!gmansoor

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,5e0de914e2befe08,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1994-11-02 19:07:21 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!usc!nic-nac.CSU.net!gmansoor
From: gmansoor@huey.csun.edu (George Mansoor)
Newsgroups: gnu.gcc.help
Subject: sqrt
Date: 3 Nov 1994 03:07:21 GMT
Organization: Calstate University Northridge
Lines: 28
Message-ID: <399k59$rk3@nic-nac.CSU.net>
NNTP-Posting-Host: huey.csun.edu
X-Newsreader: TIN [version 1.2 PL2]