Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!watmath!clyde!rutgers!cbmvax!higgin
From: higgin@cbmvax.UUCP
Newsgroups: comp.sys.amiga
Subject: Re: C-compilers for Amiga are Terrible (really Manx problem)
Message-ID: <1098@cbmvax.cbmvax.cbm.UUCP>
Date: Wed, 10-Dec-86 20:40:55 EST
Article-I.D.: cbmvax.1098
Posted: Wed Dec 10 20:40:55 1986
Date-Received: Sun, 14-Dec-86 08:36:33 EST
References: <8611191016.AA19776@cory.Berkeley.EDU> <1074@zen.BERKELEY.EDU> <1133@zen.BERKELEY.EDU> <9705@sun.uucp> <3060@garfield.UUCP>
Reply-To: higgin@cbmvax.UUCP (Paul Higginbottom GUEST)
Distribution: net
Organization: PDH, Inc.
Lines: 36

In article <3060@garfield.UUCP> john13@garfield.UUCP (John Russell) writes:
>One problem I haven't seen mentioned (although if it is known and there is a
>way around it, I'd like to hear about it!):
>
>Manx printf doesn't like %f!
>
>main()
>{ float x=1;
>  printf("%f\n",x); }
>
>causes an "f" to be printed when I run it through Manx.
>...
>Thanks for any help!
>
>John

This may have already been answered (I've been off the net for over a week),
but I think your problem is that you're not linking to m.lib FIRST.

There are two versions of printf in the Manx libraries, and the one you
want (which supports printing floating point numbers) is in m.lib.  The
other is in c.lib and doesn't support floating point and so is much smaller.
Since not all programs need floating point, this setup is smart, but it
requires that if you want the floating point version of printf() you must
link as follows:

	ln foo.o -lm -lc

NOTE: -lm comes first to force the linker to resolve the external reference
of printf in foo.o in m.lib and not c.lib.

Hope this helps,

	Paul.

Disclaimer: I work for myself, and my opinions are my own.