🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #813

Re: Bug of Turbo C 2.0?

#813
From: Robert B. Hood
Date: Fri, 17 Apr 1992 01:28
55 lines
2476 bytes
In article <1992Apr15.045942.9349@ux1.cso.uiuc.edu> klg0582@uxa.cso.uiuc.edu (Ken-Huang Lin) writes:
>
>  I was writing a program using Turbo C 2.0.  The program seemed to be
>working.  However, after I moved part of the code into a function, it
>gave me this run-time error message when the program reached the same
>code now in the function:
>
>"scanf: floating point formats not linked"
>
>  I downloaded the patch "tc2pat.arc" and applied it.  Only some
>patches would work.  The file "patfloat.bat", which is supposed to fix
>"floating point formats not linked" problem, said "Incorrect file or
>version of program file".  (The compiler is version 2.01.)  Does
>anyone have any clue?
>

After suffering through flames, I was told that I needed to include
a FP operation or declaration for the compliler to see (like
"float  f = 1.0;").  It was then supposed to link in the required
support, and I wouldn't see the above message (or the one that
my printf was displaying).  It didn't work.

However, running the BCC command, and allowing it to automatically
link a file that contained scanf/printf FP formats with no other
referrence, worked!  I aborted the BCC command during the link
phase, and examined the ``turboc.$ln'' file that the compiler
automatically creates (and destroys).

My link file scanned libraries in this order:

             d:\bcc\lib\cl+
             d:\bcc\lib\mathl+
             d:\bcc\lib\emu

however, changing the order to that appearing in the
``turboc.$ln'' file:

             d:\bcc\lib\emu+
             d:\bcc\lib\mathl+
             d:\bcc\lib\cl

made my program work perfectly -- without any kludgy constants
or procedures.

Try it.

>Ken H. Lin
>khlin@uiwpls.ece.uiuc.edu

Bob
-- 
Bob Hood    thor@arrakis.denver.co.us     H: 303-980-8392  W: 303-236-8959
---------------------------------------------------------------------------
           If a program is useful, it will have to be changed.
         If a program is useless, it will have to be documented.
Technical Details
Message-ID: <1992Apr17.012847.1037@arrakis.denver.co.us>
Path: arc1-ca.pugleaf.net!sparky!uunet!mnemosyne.cs.du.edu!arrakis!thor
References: <1992Apr15.045942.9349@ux1.cso.uiuc.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!mnemosyne.cs.du.edu!arrakis!thor
From: thor@arrakis.denver.co.us (Robert B. Hood)
Subject: Re: Bug of Turbo C 2.0?
Message-ID: <1992Apr17.012847.1037@arrakis.denver.co.us>
Keywords: Turbo C
Organization: Bob's Programming Paradise, Lakewood, CO, USA
References: <1992Apr15.045942.9349@ux1.cso.uiuc.edu>
Date: Fri, 17 Apr 1992 01:28:47 GMT
Lines: 55