Xref: utzoo comp.sys.ibm.pc:44101 alt.msdos.programmer:1199 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!cica!iuvax!maytag!watstat!dmurdoch From: dmurdoch@watstat.waterloo.edu (Duncan Murdoch) Newsgroups: comp.sys.ibm.pc,alt.msdos.programmer Subject: Re: scanf problem in TC v2.01. Message-ID: <1487@maytag.waterloo.edu> Date: 10 Feb 90 04:11:29 GMT References: <7192.25d1e107@dit.ie> Sender: daemon@maytag.waterloo.edu Reply-To: dmurdoch@watstat.waterloo.edu (Duncan Murdoch) Organization: U. of Waterloo, Ontario Lines: 28 In article <7192.25d1e107@dit.ie> alawlor@dit.ie (Aengus Lawlor) writes: >I'm having a problem using scanf in Turbo C 2.01. > >When I have the code > > fscanf(f,"%f",x); > >it compiles and links fine, but at run time I get > > scanf : floating point formats not linked >Abnormal program termination I saw this bug about a year ago, and found a fix for it. The details are hazy, so you'll have to do some work: The problem is that sometimes TC forgets to link in the floating point formats, just as the message says. I don't know the exact conditions to force linking, but an explicit reference to a certain routine is sufficient. The routine is named something like __turbofloat. You'll have to use TDUMP on a .OBJ file that works, and look through the externals it declares, to find the exact name. Then add a line something like if (1 == 0 ) __turbofloat(); to force it to be linked in. Sorry I can't be more precise, but I only use C when I have to. Duncan Murdoch