From owner-freebsd-questions Mon May 3 4:44: 6 1999 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 35034150DA for ; Mon, 3 May 1999 04:44:02 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from scientia.demon.co.uk (ident=ben) by scientia.demon.co.uk with local (Exim 2.12 #1) id 10eH8J-000KON-00; Mon, 3 May 1999 12:43:35 +0100 (envelope-from ben@scientia.demon.co.uk) Date: Mon, 3 May 1999 12:43:35 +0100 From: Ben Smithurst To: Donald Cc: freebsd-questions@FreeBSD.ORG Subject: Re: gcc compiler Message-ID: <19990503124335.B78218@scientia.demon.co.uk> References: <199905030404.AAA20284@cc942873-a.ewndsr1.nj.home.com> <372CCFC8.98F2409@eoe-magical.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <372CCFC8.98F2409@eoe-magical.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Donald wrote: > 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. RTFM for ltoa. There isn't one, so FreeBSD probably doesn't have that function. Just use snprintf(3) to convert a number to a string, unless anyone knows a better way. -- Ben Smithurst ben@scientia.demon.co.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message