Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!rutgers!usenet!ogicse!qiclab!percy!parsely!pdxgate!jove!mwizard From: mwizard@jove.cs.pdx.edu (Craig R. Nelson) Newsgroups: comp.lang.pascal Subject: Re: C PASCAL INTERFACE Message-ID: <2266@pdxgate.UUCP> Date: 7 Apr 91 10:40:58 GMT References: <2941@cod.NOSC.MIL> <2257@wet.UUCP> <1991Apr5.211211.24087@ux1.cso.uiuc.edu> Sender: news@pdxgate.UUCP Lines: 40 amead@s.psych.uiuc.edu (alan mead) writes: >seth@wet.UUCP (Seth Olitzky) writes: >>In article <2941@cod.NOSC.MIL> vtran@cod.NOSC.MIL (Viet D. Tran) writes: >>> >>>I have programs that were written in two different languages, Pascal >>>and C. Now, I am having trouble combining them together, or linking >>>... >>A lot depends on what compilers and target machine you are using. Borland >>pascal TPU are not compatible with Borland C objects. You will need to >>... >Actually, I think any .OBJ file can be linked to Turbo Pascal (probably >most other popular compilers as well). The problem is whether or not >pascal can use the code. >The answer is usually yes--Ohlsen and Stoker have a longish chapter on >linking C with Turbo Pascal in _Advanced Techniques in Turbo Pascal_ >(<- that's only an approximate title :( Mention on other thing. Lets not have everyone out there trying to write C functions a linking them into Pascal just so they can call their techincal reps and raise hell when it doesn't link or doesn't run properly. Remember to enforce Pascal calling conventions on the C code when it is being compiled. This is the primary reason that standard runtime library routines will not link in correctly. Also, lets remember to drop the damn underscore. []====================================================================[] || Craig R. Nelson | CCSofD Software Inc. || || Programmer | Beaverton, OR, 97005 || || mwizard@eecs.ee.pdx.edu | (unlisted on the net) || ||====================================================================|| || The opinions expressed here are mine. No one gave them to me. || || Since I own half of it they are also the companie's opinons. || || (but only fifty-percent of the time.) || []====================================================================[]