www.digitalmars.com         C & C++   DMDScript  

c++.dos.16-bits - Replacing Borland's TLINK

reply "Alex Pavloff" <apavloff eason.com> writes:
Hi there.  I'm trying to use Optilink to replace Borlands TLINK, but its
mainly because TLINK runs very, very badly under Windows NT and 2000.  I
want to keep using the existing Borland libraries.  My program, using
floating point emulation, links fine (with slight modifications to account
for the different options) save for:

OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

F:\BC5\LIB\MATHL.LIB(emuvars)  Offset 00303H Record Type 0098
 Warning 74: STACK Combine type overrides others : _STACK
F:\BC5\LIB\EMU.LIB(e87trap)
 Error 42: Symbol Undefined SSalias  

The file I'm using to drive the linker to make a 16-bit DOS executable with
a large memory model is:

/NODEBUG /EXEPACK /EXETYPE:DOS /MAP /PACKCODE /PACKDATA /PACKFUNCTIONS
/XREF+
F:\OIBUIL~1\SOURCE\Compile\lib\c0l.obj   (Borland's startup code)
F:\OIBUIL~1\SOURCE\Download\runt.exe
F:\OIBUIL~1\SOURCE\Download\runt.map
F:\OIBUIL~1\SOURCE\Compile\lib\noehl.lib +  (Borland file to suppress C++
exceptions -- I use C++)
F:\BC5\LIB\GRAPHICS.LIB +    ( Borland's Graphics lib )
F:\BC5\LIB\MATHL.LIB +          ( Borland's Math lib -- large memory model )
F:\BC5\LIB\EMU.LIB +              ( Borlands floating point emulation lib )
F:\OIBUIL~1\SOURCE\Compile\lib\runtlib.lib +    ( the lib containing most of
my code )
F:\OIBUIL~1\SOURCE\Compile\lib\cl.lib +    ( Borland's standard runtime,
large memory model)
.... followed by some more of my libraries


When my program starts up, its complains about the floating point formats
not being linked in.  Obviously, EMU.LIB isn't being linked because of the
error -- but I don't know what this error is.   I don't know if its related
to the first error or not.

Any idea/thoughts would be great!

Alex Pavloff
Software Engineer
Eason Technology
Sep 12 2001
next sibling parent reply "Walter" <walter digitalmars.com> writes:
Information on combine types is on:

    www.digitalmars.com/ctgLinkOps.html

-Walter

Alex Pavloff wrote in message <9np01i$c18$1 digitaldaemon.com>...
Hi there.  I'm trying to use Optilink to replace Borlands TLINK, but its
mainly because TLINK runs very, very badly under Windows NT and 2000.  I
want to keep using the existing Borland libraries.  My program, using
floating point emulation, links fine (with slight modifications to account
for the different options) save for:

OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

F:\BC5\LIB\MATHL.LIB(emuvars)  Offset 00303H Record Type 0098
 Warning 74: STACK Combine type overrides others : _STACK
F:\BC5\LIB\EMU.LIB(e87trap)
 Error 42: Symbol Undefined SSalias  

The file I'm using to drive the linker to make a 16-bit DOS executable with
a large memory model is:

/NODEBUG /EXEPACK /EXETYPE:DOS /MAP /PACKCODE /PACKDATA /PACKFUNCTIONS
/XREF+
F:\OIBUIL~1\SOURCE\Compile\lib\c0l.obj   (Borland's startup code)
F:\OIBUIL~1\SOURCE\Download\runt.exe
F:\OIBUIL~1\SOURCE\Download\runt.map
F:\OIBUIL~1\SOURCE\Compile\lib\noehl.lib +  (Borland file to suppress C++
exceptions -- I use C++)
F:\BC5\LIB\GRAPHICS.LIB +    ( Borland's Graphics lib )
F:\BC5\LIB\MATHL.LIB +          ( Borland's Math lib -- large memory
model )
F:\BC5\LIB\EMU.LIB +              ( Borlands floating point emulation lib )
F:\OIBUIL~1\SOURCE\Compile\lib\runtlib.lib +    ( the lib containing most
of
my code )
F:\OIBUIL~1\SOURCE\Compile\lib\cl.lib +    ( Borland's standard runtime,
large memory model)
.... followed by some more of my libraries


When my program starts up, its complains about the floating point formats
not being linked in.  Obviously, EMU.LIB isn't being linked because of the
error -- but I don't know what this error is.   I don't know if its related
to the first error or not.

Any idea/thoughts would be great!

Alex Pavloff
Software Engineer
Eason Technology
Sep 12 2001
parent reply "Alex Pavloff" <apavloff eason.com> writes:
Walter <walter digitalmars.com> wrote in message
news:9npfj6$krf$1 digitaldaemon.com...
 Information on combine types is on:

     www.digitalmars.com/ctgLinkOps.html
I assume you mean http://www.digitalmars.com/ctg/ctgLinkOps.html I've looked back and forth through this. I've turned off all the PACK options (using /NO), and the exact same thing happens. Am I missing an option? Would combine type issues cause the error (as opposed to the warning) This is what I'm really concerned about:
F:\BC5\LIB\EMU.LIB(e87trap)  Error 42: Symbol Undefined SSalias  
Any thoughts on that? -- the same files will link with Borland's 16-bit TLINK from Borland C++ 5.
Sep 13 2001
parent reply Jan Knepper <jan smartsoft.cc> writes:
 This is what I'm really concerned about:
F:\BC5\LIB\EMU.LIB(e87trap)  Error 42: Symbol Undefined SSalias  
Any thoughts on that? -- the same files will link with Borland's 16-bit TLINK from Borland C++ 5.
It sounds like TLINK is pulling in other .OBJ/.LIB files that are not being supplied to OptLink. Jan
Sep 13 2001
next sibling parent reply "Alex Pavloff" <apavloff eason.com> writes:
Jan Knepper <jan smartsoft.cc> wrote in message
news:3BA0E4BE.A052DABB smartsoft.cc...
 This is what I'm really concerned about:
F:\BC5\LIB\EMU.LIB(e87trap)  Error 42: Symbol Undefined SSalias  
Any thoughts on that? -- the same files will link with Borland's 16-bit TLINK from Borland C++ 5.
It sounds like TLINK is pulling in other .OBJ/.LIB files that are not
being
 supplied to OptLink.
I don't think so. I usually run TLINK on a system containing nothing but TLINK.EXE and RTM.EXE with all the libraries and objs on the system being provided by me. There's nothing else that it could link to, because they're not on the system. The same error occurs if I try to link in FP87.LIB (the non-emulation version) of the library. Using TDUMP on EMU.LIB, I find: 000099 EXTDEF 1 : '__emu' Type: 0 2 : 'FIDRQQ' Type: 0 3 : 'SSalias ' Type: 0 Doing a search for "SSalias" in the entire BC5 folder finds only the two matches in EMU.LIB and FP87.LIB. Is TLINK not playing by the rules?
Sep 13 2001
parent reply "Walter" <walter digitalmars.com> writes:
Alex Pavloff wrote in message <9nqpf0$1dn1$1 digitaldaemon.com>...
Doing a search for "SSalias" in the entire BC5 folder finds only the two
matches in EMU.LIB and FP87.LIB.  Is TLINK not playing by the rules?
It may be a symbol internally generated by TLINK. I'd grep the TLINK executable for the name. -Walter
Sep 13 2001
parent reply "Alex Pavloff" <apavloff eason.com> writes:
 Alex Pavloff wrote in message <9nqpf0$1dn1$1 digitaldaemon.com>...
Doing a search for "SSalias" in the entire BC5 folder finds only the two
matches in EMU.LIB and FP87.LIB.  Is TLINK not playing by the rules?
It may be a symbol internally generated by TLINK. I'd grep the TLINK executable for the name. -Walter
Nothing in the TLINK exe. No SSalias or SSalias anywhere in the BC5 directory save for those in EMU.LIB and FP87.LIB, both external definitions. Nothing in my libraries containing SSalias. Nothing called SSalias in a map file of the EXE output generated by TLINK. I'm stumped. I know you guys probably think I'm screwing something up (I wish I was!). Any more ideas? Any way I can tell it to not worry about that undefined symbol to see if that even works?
Sep 14 2001
parent reply "Walter" <walter digitalmars.com> writes:
I don't have an answer for you. You can do things like disassemble the
EMU.LIB and see who is referring to it and why. Or you could compile the
whole thing with Digital Mars <g>.


Alex Pavloff wrote in message <9ntf51$2svi$1 digitaldaemon.com>...
 Alex Pavloff wrote in message <9nqpf0$1dn1$1 digitaldaemon.com>...
Doing a search for "SSalias" in the entire BC5 folder finds only the two
matches in EMU.LIB and FP87.LIB.  Is TLINK not playing by the rules?
It may be a symbol internally generated by TLINK. I'd grep the TLINK executable for the name. -Walter
Nothing in the TLINK exe. No SSalias or SSalias anywhere in the BC5 directory save for those in EMU.LIB and FP87.LIB, both external
definitions.
Nothing in my libraries containing SSalias. Nothing called SSalias in a map
file of the EXE output generated by TLINK.

I'm stumped.  I know you guys probably think I'm screwing something up (I
wish I was!).  Any more ideas?  Any way I can tell it to not worry about
that undefined symbol to see if that even works?
Sep 14 2001
parent "Alex Pavloff" <alex pavloff.net> writes:
"Walter" <walter digitalmars.com> wrote in message
news:9nup9b$hem$1 digitaldaemon.com...
 I don't have an answer for you. You can do things like disassemble the
 EMU.LIB and see who is referring to it and why. Or you could compile the
 whole thing with Digital Mars <g>.
Hrm. Well, I found out how to beat TLINK into submission and make it work under NT. (Call it from a batch file, as opposed to directly via CreateProcess or ShellExecute). Even then, I'm stuck with using Borland BGI (16 colors! whoohoo!). Thanks for all your help though! And Borland sucks. :-)
Sep 15 2001
prev sibling parent "Alex Pavloff" <apavloff eason.com> writes:
I've fixed the _STACK error by using the c0fl.obj (as opposed to c0l.obj).
This, apparently, is the "OBJ MS compatible startup", which has the effect
of forcing SS=DS in all cases.  All that is left is the unresolved symbol
for the floating point.
Sep 13 2001
prev sibling parent Sergey Kostrov <SergeyKostrov hotmail.com> writes:
I just came across a problem related to "floating point formats not
linked" message and I know that my post is possibly too late.

But, for a person who stil wants to understand the problem the
answer is as follows:

In order to force linking of floating point formats use the
following statements in your source files:

     extern unsigned _floatconvert;
     #pragma extref _floatconvert

Best regards,
Sergey Kostrov
Feb 20 2011