rsites
28.01.2008, 18:26 |
16-Bit DOS Extenders (Users) |
I have obtained a copy of the Phar Lap 286/Extender. This seems work well with my Borland C++ 3.1 16-Bit DOS application. I have one error when I try to format a foating point number using printf for example. The error is:
"printf : floating point formats not linked. Abnormal program termination"
Does anybody have any idea what header file or library file I need to include to remove this error. All other formats (strings, integers) worked correctly without error. |
Japheth
Germany (South), 28.01.2008, 19:35
@ rsites
|
16-Bit DOS Extenders |
> I have obtained a copy of the Phar Lap 286/Extender. This seems work well
> with my Borland C++ 3.1 16-Bit DOS application. I have one error when I
> try to format a foating point number using printf for example. The error
> is:
>
> "printf : floating point formats not linked. Abnormal program
> termination"
>
> Does anybody have any idea what header file or library file I need to
> include to remove this error. All other formats (strings, integers)
> worked correctly without error.
It's not a question of header files. You have to force the linker to include the floating point stuff. IIRC there is/was an external "_fltused" which has to be referenced in the source. I also remember with MS VC 1.5, it was sufficient to declare a initialized global floating point variable somewhere, the reference to _fltused was not needed then. --- MS-DOS forever! |
RayeR
CZ, 28.01.2008, 21:48
@ Japheth
|
16-Bit DOS Extenders |
> It's not a question of header files. You have to force the linker to
> include the floating point stuff. IIRC there is/was an external "_fltused"
> which has to be referenced in the source. I also remember with MS VC 1.5,
> it was sufficient to declare a initialized global floating point variable
> somewhere, the reference to _fltused was not needed then.
Yes, similar to avr-gcc. It also doesn't link the big version of ?printf and ?scanf with float support by default because of size. You need to use special linker option to link full version. But I cannot tell you the option for BC. --- DOS gives me freedom to unlimited HW access. |
rsites
29.01.2008, 14:12
@ RayeR
|
16-Bit DOS Extenders |
> Yes, similar to avr-gcc. It also doesn't link the big version of ?printf
> and ?scanf with float support by default because of size. You need to use
> special linker option to link full version. But I cannot tell you the
> option for BC.
Thanks for the info. Have not found the linker option in BC++ 3.1 or any reference to _fltused but with this information I may be able to find what is required. If there is any other info available, I would be very appreciative. |
rr
Berlin, Germany, 29.01.2008, 15:29
@ rsites
|
16-Bit DOS Extenders |
> Thanks for the info. Have not found the linker option in BC++ 3.1 or any
> reference to _fltused but with this information I may be able to find what
> is required. If there is any other info available, I would be very
> appreciative.
Do you know Google?
Please read Why did my program bomb at run time with 'floating point formats not linked' or 'floating point not loaded'? for a solution. Also in chapter 15 of A to Z of C or C Primer Plus, Fifth Edition. --- Forum admin |
rsites
29.01.2008, 17:57
@ rr
|
16-Bit DOS Extenders |
> Please read Why did my
> program bomb at run time with 'floating point formats not linked' or
> 'floating point not loaded'? for a solution. Also in chapter 15 of
> A to Z of C or
> C Primer Plus,
> Fifth Edition.
Thanks again. None of the above work with Borland 3.1 |
rr
Berlin, Germany, 29.01.2008, 22:32
@ rsites
|
16-Bit DOS Extenders |
> Thanks again. None of the above work with Borland 3.1
1) Do not bottom-post!
2) Get rid of Phar Lap 286.
3) Post your source code. --- Forum admin |
Rugxulo
Usono, 30.01.2008, 04:37
@ rsites
|
16-Bit DOS Extenders |
> > Please read Why did
> my
> > program bomb at run time with 'floating point formats not linked' or
> > 'floating point not loaded'? for a solution. Also in chapter 15
> of
> > A to Z of C or
> > C Primer Plus,
> > Fifth Edition.
>
> Thanks again. None of the above work with Borland 3.1
So you tried the extern/pragma method? BTW, dare I ask, is there any huge reason for using Phar Lap and Borland 3.1 instead of something else? What cpu(s) are you targeting? --- Know your limits.h |
rsites
30.01.2008, 14:38
@ Rugxulo
|
16-Bit DOS Extenders |
> So you tried the extern/pragma method? BTW, dare I ask, is there any huge
> reason for using Phar Lap and Borland 3.1 instead of something else? What
> cpu(s) are you targeting?
The code compiles, links and runs completely in real mode. It is when I link and run with Phar Lap 286/Extender that I get the "floating point formats not linked" error. Adding the extern/pragma method did not resolve this issue. I am using Borland C++ 3.1 because that is what the code is written in and has been run in over the last 10 years. I would like not to have to port this code to some other compiler. I am trying to use Phar Lap 286/Extender because it has been the only 16-bit extender that works with Borland C++ that I have been able to obtain. The code is run on a single board computer running Datalight ROM DOS 6.22. |
rr
Berlin, Germany, 30.01.2008, 15:05
@ rsites
|
16-Bit DOS Extenders |
[snip]
Another bottom-post and I'll will block your account. Please delete not required quoted text! --- Forum admin |