[alt.msdos.programmer] HELP!!

brent@sactoh0.UUCP (Brent K. Barrett) (11/16/89)

 HELP!  I'm in some trouble here, and all the debugging I'm capable
of hasn't helped (yet).  I'm working on a project called TPR (what
it does isn't important) in Turbo C 2.0.  
 
 The problem:  TLINK reports "Undefined symbol 'FPE1st' in module
EMUINIT" (and the same for 'FPElast').  I will include my MAKEFILE
and a copy of the MAP file.
 
 I've done many programs using the emu.lib and floating point data
types, so it's not something new to me.  This, however, has never
happened before.  The only floating point is in one function in the
module entitled "main.c."  The float type is part of a structure,
and is also referenced when printed by printf().  I will include 
the function as well at the end of this message.
 
 Please respond by mail only as I'm not always reading these
newsgroups.  Thank you very much.

 
MAKEFILE:
.c.obj:
  tcc -mc -Id:\src\novu -c $<
 
tpr.exe: main.obj misc.obj screen.obj file.obj help.obj
    tlink /c d:\src\novu\c0c main misc screen file help, tpr,,\
      d:\src\novu\emu d:\src\novu\cc
 
main.obj: tpr.h
misc.obj: tpr.h
screen.obj: tpr.h
file.obj: tpr.h
help.obj: tpr.h

MAP FILE:
 Start  Stop   Length Name               Class
 
 00000H 03D12H 03D13H _TEXT              CODE
 03D20H 06316H 025F7H EMU_PROG           CODE
 06320H 06736H 00417H E87_PROG           CODE
 06740H 07059H 0091AH _DATA              DATA
 0705AH 0705DH 00004H _EMUSEG            DATA
 0705EH 0705FH 00002H _CRTSEG            DATA
 07060H 07061H 00002H _CVTSEG            DATA
 07062H 07067H 00006H _SCNSEG            DATA
 07068H 08057H 00FF0H _BSS               BSS
 08058H 08058H 00000H _BSSEND            STACK
 08060H 08145H 000E6H _STACK             STACK
 
Undefined symbol 'FPE1st' in module EMUINIT
Undefined symbol 'FPElast' in module EMUINIT
Program entry point at 0000:0000
 
/*
 *  do_calc()
 */
void do_calc(int m_min, int m_max, int c_min, int c_max)
{
    struct {
        int min;
        int max;
        float sens;
    } ctrl[9] = { {  40,  65, 0.48F },  /* Johnson Controls values
*/
                  {  60,  85, 0.48F },
                  {  50, 100, 0.24F },
                  {  20, 120, 0.12F },
                  {   0, 100, 0.12F },
                  {  50, 150, 0.12F },
                  { -40, 160, 0.06F },
                  {  40, 240, 0.06F },
                  { 200, 400, 0.06F }
                };
    char which;
    float ratio;
    int m_temp;
    int c_temp;
 
    gotoxy(1, 25);
    for (which=0; which<9; which++)
        printf("Min=%d, Max=%d, Sens=%f\n", ctrl[which].min,
ctrl[which].max,
          ctrl[which].sens);
 
    getch();
}
 
 (Note:  this is only a test function at this time, hence the lack
of use of the arguments :-).

-- 
  ////////      Novucivitas: The Future of Citadel       //////// 
 ///    US 916 725 0674 3/12/2400 bps GEMAIL: B.K.BARRETT    /// 
////////          ..ames!pacbell!sactoh0!brent         //////// 

evas@cs.eur.nl (Eelco van Asperen) (11/16/89)

brent@sactoh0.UUCP (Brent K. Barrett) writes:
> The problem:  TLINK reports "Undefined symbol 'FPE1st' in module
>EMUINIT" (and the same for 'FPElast').  I will include my MAKEFILE
>and a copy of the MAP file.

Try including the math-library (MATHC.LIB for Compact-model).
That should solve the problem. 
[Algorithm: TDUMP MATHC.LIB | grep FPE1 ]


-- 
Eelco van Asperen
Uucp: evas@cs.eur.nl ||  Earn/Bitnet: asperen@hroeur5
"Stick a fork in their ass and turn them over, they're done",
					Lou Reed, Last Great American Whale

brent@sactoh0.UUCP (Brent K. Barrett) (11/19/89)

 
 I want to thank the one fellow who did respond.  Although my
problem wasn't really related to the solution he suggested, it was
very nice of him to at least try.
 
 I solved the problem myself after some work and a big SMACK on the
head when I realized how stupid I was.  I had forgotten to include
to math library for the model I was using!  Ugh.  
 
 Thank you for your time.

-- 
  ////////      Novucivitas: The Future of Citadel       //////// 
 ///    US 916 725 0674 3/12/2400 bps GEMAIL: B.K.BARRETT    /// 
////////          ..ames!pacbell!sactoh0!brent         ////////