Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 May 1999 23:20:57 +0100
From:      Donald <druid@eoe-magical.org>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: gcc compiler
Message-ID:  <372CCFC8.98F2409@eoe-magical.org>
References:  <199905030404.AAA20284@cc942873-a.ewndsr1.nj.home.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In compiling a program using
gcc filename.c -o filename -lm
I get an error
Undefined sysbol _ltoa referenced from text segment

from this I figure that as I am not making a call to the function
LongToAscii  (ltoa) that some part of a call is, what lib needs to
be loaded for this to work.
I assumed the -lm was what was needed.


"Crist J. Clark" wrote:

> Donald wrote,
> > gcc filename.c -o filename
> >
> > compiles to a exe file, but I forgot how to link the
> > math library, can ome one help.
>
> RTFM.
>
> % gcc -lm filename.c -o filname
>
> --
> Crist J. Clark                           cjclark@home.com
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?372CCFC8.98F2409>