[comp.os.msdos.programmer] Help using f2c with Borland C++

Jay Thierry HAN <HAN@FRECP12.BITNET> (06/23/91)

Hello,
     I am trying to use f2c (the Fortran 77 -> C[++] translator) with the
Borland C++ compiler, and seem to have setup problems. After tweaking the
command line switches, I have been able to run f2c and bcc on my Fortran code.
But when I try to link (Turbo Link) the whole, I get stucked with a missing
library 'llibce.lib' message.
     So I tried to re-compile the f2c libraries, but with no success. First,
I had trouble setting up the makefile for bcc and Turbo Make. And then, as
I'm not a real C programmer, I couldn't understand what to do with the ungetc
and mktemp functions mentionned in the readme about Turbo C++.
     I have a 286 with 1Meg RAM and DOS 3.3 + 4DOS 3.03. I use Borland
utilities: bcc, Turbo make, Turbo link (tlink), and Turbo lib (tlib). I always
used ANSI C, either with f2c and with bcc. I need at least the large model for
my Fortran program. That Fortran code is not big at all, amounting to about
1700 lines in 8 files, and the biggest routine is 250 lines long.
     Any help will be greatly appreciated. Thanks.

                                                     J. Han.

dfenyes@thesis1.med.uth.tmc.edu (David Fenyes) (06/25/91)

[ I tried to reply by mail, but the mail bounced :-( ]
Hello,

In article <91174.123837HAN@FRECP12.BITNET> you write:
>     I am trying to use f2c (the Fortran 77 -> C[++] translator) with the
>Borland C++ compiler, and seem to have setup problems. After tweaking the
>command line switches, I have been able to run f2c and bcc on my Fortran code.

I'm curious to know the problems you had (Was it the name table size?)

>But when I try to link (Turbo Link) the whole, I get stucked with a missing
>library 'llibce.lib' message.

Hmm.  I compiled the libraries with MSC 5.1, which is all I had available.
I didn't think that the libraries should contain any mention of where
missing symbols should be sought.  I thought this was all resolved at
link time by the linker.  However, there's no telling what microsoft sticks
in its object files.  llibce.lib is the MSC 5.1 C library for xxx87
emulation, large model.

Here's an experiment-- If you try linking with the small model, do you get
an 'slibce.lib missing' error?  If so, it's in the library.

I'm very surprised at this behavior, since before linking, nothing should
be able to predict whether you'll use llibce.lib (emulation), or llibc7.lib
(80x87 installed)., etc.  I'll look into it at this end also.

I should think it entirely reasonable to compile libraries with MSC 5.1
and link with bcc.

Good luck, and let me know what transpires :-)

David.
---
David Fenyes                                 dfenyes@thesis1.med.uth.tmc.edu
University of Texas Medical School           Houston, Texas