Turbo C 2.0 not linking printf f.p. formats
Greg Flint
afc at mace.cc.purdue.edu
Tue May 7 05:11:43 AEST 1991
In <11067 at hub.ucsb.edu> jackg at capella.ucsb.EDU (Jack Greenbaum) writes:
>Within a graphics based application written using Turbo C 2.0 I use
>sprintf("%f ...., but when the program gets there it aborts and prints
>the run-time error message "printf : floating point formats not linked".
>The program runs correctly if I remove this line.
>Just for fun I put a printf("%f\n",1.0) as the first line in the program,
>and got the same error.
This problem also exists with Turbo C++ version 1.01.
Borland knows about this error and has the following work-around:
1) add the line "#include <math.h>" to your list of include files.
2) call some math function to a dummy float variable, e.g., use
float dummy;
dummy = cos (1.0);
The floating point libraries will now be loaded for use with the [sf]printf
functions.
I found this out after calling Borland and waiting the usual 20 minutes on
hold -- which brings me to the question: Is there any place that Borland
posts such known bugs and, if available, work-arounds? If so, where?
And would someone reading the list be willing to post updates to it to the
net? Or archive it at an ftp-accessable site?
....Greg Flint (afc at klaatu.cc.purdue.edu)
More information about the Comp.lang.c
mailing list