🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Philip Goisman Wed, 27 Nov 1996 00:00
Re: trouble compiling
#6100
Author: Philip Goisman
Date: Wed, 27 Nov 1996 00:00
21 lines
1017 bytes
>Hello... I recently started using the GCC C compiler on my Linux box, and 
>am having some trouble.  I'm trying to use the atan (arc tangent) 
>function (in math.h), but when I compile my code, the linker (I think) 
>tells me:
>/tmp/cca006221.o(.text+0x20): undefined reference to `atan'

>my (test) source code consists of the following:

>#include <stdio.h>
>#include <math.h>

>void main()
>{
> printf("%f\n",atan(5));
>}

	I compiled with gcc -Wall testP.c -lm
and got 1.373401.  You probably forget the -lm.

		Philip
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads