[comp.os.msdos.programmer] Turbo Pascal calling Turbo C

mjb@goanna.cs.rmit.oz.au (Mat Boek) (03/19/91)

I wonder if any Borland gurus out there could answer this (I hope) simple
question for me:-

I have an Turbo C function which I want to call from a Turbo Pascal program.  
I compile it with the Pascal calling conventions for parameter passing in C, 
and use the $L compiler directive and declare the function as extern in the 
Pascal Program.  Now, the C function calls another C function, in another 
object file.. if I include this second C object file in the Pascal program 
with a second $L, should it work?  

Please reply directly via e-mail,

Thanks in advance,

Mat.



-- 
Mat Boek, Computer Science        ACSnet: mjb@goanna.cs.rmit.oz
R.M.I.T.                          ARPA:   mjb%goanna.cs.rmit.oz.au@uunet.uu.net
GPO BOX 2476 V,                   CSNET:  mjb%goanna.cs.rmit.oz.au@australia
Melbourne, 3001, AUSTRALIA        UUCP:   ...!uunet!goanna.cs.rmit.oz.au!mjb

ts@uwasa.fi (Timo Salmi) (03/20/91)

In article <5002@goanna.cs.rmit.oz.au> mjb@goanna.cs.rmit.oz.au (Mat Boek) writes:
:
>I have an Turbo C function which I want to call from a Turbo Pascal program.  
>I compile it with the Pascal calling conventions for parameter passing in C, 
:

There is information on linking C to TP in Olhsen & Stoker, Turbo
Pascal Advanced Techniques, Que, 1989.  I cannot guarantee, though,
that it will solve your particular problem. 

...................................................................
Prof. Timo Salmi        
Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun