X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: c and fortran Date: 5 Mar 2005 12:11:16 GMT Lines: 18 Message-ID: <38tlv4F5q8ntcU5@news.dfncis.de> References: <4228677e$0$15534$91cee783 AT newsreader02 DOT highway DOT telekom DOT at> X-Trace: news.dfncis.de xxqC/lUjAj/iz1uUCCKpWwv9pVHYqRnH6LJSqYF2w7I7HO7oVmQF1ovJE9 X-Orig-Path: not-for-mail To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com FloX wrote: > hi! > i want to call c functions from a fortran code. (i want to use fortran > code which calls allegro functions). Getting that right in the general case is surprisingly tricky. If you can, I would suggest you try the cfortran.h interface header for this. Fortran can't call the majority of C functions directly, because Fortran is strictly pass-by-reference, C is strictly pass-by-value. This means you need a huge collection of man-in-the-middle functions to resolve such differences. Writing all of those for an interface the size and complexity of Allegro's would be a huge amount of work. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.