Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
rsites(R)

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.

rr(R)

Homepage E-mail

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!

rsites(R)

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.

Rugxulo(R)

Homepage

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

rr(R)

Homepage E-mail

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.

rsites(R)

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(R)

Homepage E-mail

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? :-P

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.

rsites(R)

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.

RayeR(R)

Homepage

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.

Japheth(R)

Homepage

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!

Back to the board
Thread view  Mix view  Order
15188 Postings in 1365 Threads, 250 registered users, 17 users online (0 registered, 17 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum