🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #376

Re: Link .TPU files into Borland C?????

#376
From: Duncan Murdoch
Date: Tue, 11 Aug 1992 15:17
27 lines
1631 bytes
In article <1992Aug10.115335.58021@cc.usu.edu> slb1b@cc.usu.edu (Holographic Banana) writes:
>HELP!
>
>Is there any way to link Turbo Pascal .TPU files into Borland C++? I've got
>about 20,000 lines of code that I _DON'T_ want to re-write (for some odd reason
>:-)).  
>
>I figure that it'd be faster to find a way to create a header file with lots of
>extern blah pascal blah(blah, blah);
>and somehow linking in the code in the .TPU file, than to spend all of the time
>(which I don't have) to rewrite and debug  the code.
>
>I'm running TP v6.0 and BC++ v3.0 (with v3.1 on its way).
>
>Any other suggestions are very welcome.

No, the only linker that understands .TPU files is the one built in to 
TP.  You can't use TLINK to link those units into BC++.  

It is possible (with a lot of compromises) to link C or C++ into TP, so
you might want to write your main program in TP, and immediately make a
call out to C.  An alternative is to write the TP part into its own .EXE
and spawn it; that would be the quickest approach, though it might not
be good enough if you need to go back and forth between C and TP a lot.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Technical Details
Message-ID: <Bstrt0.A3F@knot.ccs.queensu.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!news.ccs.queensu.ca!dmurdoch
References: <1992Aug10.115335.58021@cc.usu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!news.ccs.queensu.ca!dmurdoch
From: dmurdoch@QueensU.CA (Duncan Murdoch)
Subject: Re: Link .TPU files into Borland C?????
Message-ID: <Bstrt0.A3F@knot.ccs.queensu.ca>
Sender: news@knot.ccs.queensu.ca (Netnews control)
Organization: Queen's University, Kingston, Canada
References: <1992Aug10.115335.58021@cc.usu.edu>
Date: Tue, 11 Aug 1992 15:17:23 GMT
Lines: 27