[comp.lang.c] Turbo C libraries

corne@philmds.UUCP (corne) (08/20/87)

I'm using the TURBO C compiler on mine AT, but my hardware was supplied 
with microsoft C libraries (no source code).

Does any one know how I can link the libraries (microsoft format) with
my TURBO C files.

I'm looking forward to any responds and thanks in advance


     .....!mcvax!phlmds!corne

sam@brspyr1.BRS.Com (Sam Baxter) (08/24/87)

in article <351@philmds.UUCP>, corne@philmds.UUCP (corne) says:
> 
> I'm using the TURBO C compiler on mine AT, but my hardware was supplied 
> with microsoft C libraries (no source code).
> 
> Does any one know how I can link the libraries (microsoft format) with
> my TURBO C files.
> 

Perhaps this will help...

I came across a shareware product on CompuServ's Borland SIG called "TCLIB"
Here's the intro paragraph from the documentation:

       The TCLIB librarian is an object code library manager for use
       with Turbo C librarys used with TLINK.  The libraries created and
       managed by this program are NOT Microsoft .LIB compatible but are
       compatible with those produced by QLIB, the quick and dirty
       library CREATE ONLY utility written by Roger Schlafy for Borland.
       It can however, read and convert Microsoft format library files,
       such as those supplied with Turbo C. The TCLIB libraries have the
       advantage of being much smaller (an average of 10K on a 70-80k
       Microsoft format lib).  The TCLIB program is also much faster
       than LIB from Microsoft.  It can extract, delete, and append
       files using an all command line approach or a command line and
       response file approach (for long lists of commands).  It can also
       provide a list of object modules in a library.

Also, the Borland documentation notes that Microsoft's .LIB files contain
"undocumented codes," which is why TLINK does not (yet) fully support them.
It notes that .OBJ files from TurboC can be linked with the standard
Microsoft LINK program.  However, having tried this myself, be assured it 
requires a special state of mind.

-- 
Sam Baxter (sam@rd.BRS.Com)
BRS Information Technologies;  Latham, NY  12110;  518-783-1161
{ seismo!rpics!rpics3b | ihnp4! { dartvax | philabs!nyfca1 } } !brspyr1!sam
"She Loved Her Boy"

tpmsph@ecsvax.UUCP (Thomas P. Morris) (08/25/87)

> in article <351@philmds.UUCP>, corne@philmds.UUCP (corne) says:
  > 
  > I'm using the TURBO C compiler on mine AT, but my hardware was supplied 
  > with microsoft C libraries (no source code).
  > 
  > Does any one know how I can link the libraries (microsoft format) with
  > my TURBO C files.
  > 
> 
	Some of the folks who have answered this seem to have missed an 
essential point (or perhaps several :-). Sure, one ought to be able to
use the Microsoft C linker---due to MS-C's use of "undocumented" object
record types which TLINK cant handle---but there are other problems or
questions which come to mind. Are the register usage and calling conventions
for MS-C and TC the same? If not, all sorts of unexpected behavior would
result. Also, the resultant EXE file would likely    require much of BOTH
the MS-C and TC run-time "helper" routines to be linked into the image,
requiring the MSC libraries. One might be able to work around this by
writing interface routines with the same names and functions, but that
would be a major effort.  Sorry if I rained on anyone's parade.

schung@cory.Berkeley.EDU (Stephen the Greatest) (08/25/87)

By the way, are there any TURBO C libraries out there?  I would like some
graphics routines that work with the Hercules graphics card.

						- Stephen

tr@wind.bellcore.com (tom reingold) (08/26/87)

In article <3395@zen.berkeley.edu> schung@cory.Berkeley.EDU.UUCP (Stephen the Greatest) writes:
>By the way, are there any TURBO C libraries out there?  I would like some
>graphics routines that work with the Hercules graphics card.
>
>						- Stephen

I recommend the Halo graphics library.  I use the version intended for
Microsoft C.  It works fine, even though I compile my programs with
Turbo C.  You can get a copy of Halo from anyone who sells software.
With each copy you buy, you can use one compiler, i.e. Microsoft or
Lattice or Aztec, and support for ALL boards made for the IBM PC,
e.g. EGA, Hercules, Targa, Number Nine, etc.

The library is quite complete and flexible, although not necessarily
fast.  Diagnostics are near nonexistant but once I got used to the
odd calling style, I got to like it.

I will send info on how I link my Turbo C programs and Halo libraries
to anyone interested.

Tom Reingold
INTERNET:       tr@bellcore.bellcore.com
UUCP: 		{seismo,ihnp4,ucbvax,decvax}!bellcore!tr
		{ulysses,allegra,clyde,princeton}!bellcore!tr