🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #49999

GCC doesn't take math functions

#49999
From: Tzusheng
Date: Fri, 26 Nov 1993 05:13
25 lines
1190 bytes
Recently I started using GCC 2.4.5 on Linux. I have a small program 
as follows:
#include <stdio.h>
#include <math.h>
#include <stdlib.h>

main()
{
  float ff, gg;


      ff = cos(1.00);
      gg = sin(1.5);
}

The messages from compiling:
$ gcc test.c
/usr/tmp/cca008811.o: Undefined symbol _cos referenced from text segment
/usr/tmp/cca008811.o: Undefined symbol _sin referenced from text segment

It seems to me that it doesn't recognize the two math functions.
I don't know if I didn't install gcc properly.  Any information
would be much appreciated.

--Tzusheng
Technical Details
Message-ID: <2d43adINN81o@duncan.cs.utk.edu>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!emory!cs.utk.edu!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,717acb45b9044233,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-11-25 21:17:55 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!emory!cs.utk.edu!not-for-mail
From: tzusheng@cs.utk.edu (Tzusheng)
Newsgroups: gnu.gcc.help
Subject: GCC doesn't take math functions
Date: 26 Nov 1993 00:13:49 -0500
Organization: CS Department, University of Tennessee, Knoxville
Lines: 26
Distribution: world
Message-ID: <2d43adINN81o@duncan.cs.utk.edu>
NNTP-Posting-Host: duncan.cs.utk.edu