[comp.os.msdos.apps] Turbo C++ Error

pjh@mccc.edu (Peter J. Holsberg) (04/09/91)

On page 165 of the TC++ library reference, there is a small expample
that uses FP_SEG.  When I compile it, I get
	undefined symbol _FP_SEG in module p165.c

I have ANSI keywords turned off and tried each memory model.  Is this a
bug or did I overlook something?

Thanks,
Pete
-- 
Prof. Peter J. Holsberg      Mercer County Community College
Voice: 609-586-4800          Engineering Technology, Computers and Math
UUCP:...!princeton!mccc!pjh  1200 Old Trenton Road, Trenton, NJ 08690
Internet: pjh@mccc.edu	     Trenton Computer Festival -- 4/20-21/91

pjh@mccc.edu (Pete Holsberg) (04/09/91)

In article <1991Apr8.184441.23026@mccc.edu> pjh@mccc.edu (Peter J. Holsberg) writes:
=On page 165 of the TC++ library reference, there is a small expample
=that uses FP_SEG.  When I compile it, I get
=	undefined symbol _FP_SEG in module p165.c
=
=I have ANSI keywords turned off and tried each memory model.  Is this a
=bug or did I overlook something?

Well, it's got to be something in the configuration because I started
from scratch and set the config to small memory modem and TC++ keywords
and it worked perfectly.

Howeverm I tried the same program under TC 2.0 and it said there was a
syntax error in the line that called FP_SEG.  Any ideas as to what that
might be from?

Pete
-- 
Prof. Peter J. Holsberg      Mercer County Community College
Voice: 609-586-4800          Engineering Technology, Computers and Math
UUCP:...!princeton!mccc!pjh  1200 Old Trenton Road, Trenton, NJ 08690
Internet: pjh@mccc.edu	     Trenton Computer Festival -- 4/20-21/91

jja@wsl.ie (John Allen on wsl) (04/18/91)

In article <1991Apr8.204147.23880@mccc.edu> pjh@mccc.edu (Pete Holsberg) writes:
>In article <1991Apr8.184441.23026@mccc.edu> pjh@mccc.edu (Peter J. Holsberg) writes:
>=On page 165 of the TC++ library reference, there is a small expample
>=that uses FP_SEG.  When I compile it, I get
>=	undefined symbol _FP_SEG in module p165.c

Make sure you are including dos.h which is where the FP_SEG() macro is defined.
I really can't unserstand why TC++ lets U use the FP_SEG() as a function when
it does not have a prototype.

Did you happen to call the file .C and also have warnings about prototypes turned off.
Name your files .CPP and get all the extra checking of a C++ compiler.
-- 
People that don't know want to know from the people that do know and if the 
poeple that do know don't tell the people that don't know then the people
that don't know still won't know.
				   "Don't quote me on any issue whatsoever."