RE: [Dev-C++] Mixed Language Programming w/Dev-Cpp
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: The Tone's. <to...@ds...> - 2002-10-30 20:16:48
|
weren't there also issues on some platforms with ordering of arguments to functions on the stack ... and issues with semantics on how stuff got popped off the stack when the call returned ? "PASCAL calling convention" semantics ? I thought maybe this same set of issues applied to COBOL and FORTRAN libs as well. Tony --- Marc Heiligers <ma...@e-...> wrote: > To Ioannis, > > Funny thing is I was reading an old Turbo C reference guide I have lying > around that mentioned linking Turbo C and Turbo Fortran (was it called > that?). Borland seemed to very proud of this cross language linking. There > are some difficulties with function name decoration and what-not that you > need to be aware of. I can't quite recall what they were, but I'll try to > remember to take a look this evening. > > I'm not sure if the same advice will apply here since it is clearly > different compilers, but it may give you an idea. I'd still look on the net > for info specific to the compilers you want to use. > > To Per, > Is there anything you don't know anything about? (LOL). > > I don't recall if the above mentioned book mentioned any difficulties with > multi-dimensional arrays. Besides, as far as I'm aware, C uses arrays of > arrays and not multi-dimensional arrays, so would the trick not be to set > your arrays up in the same way that Fortran does? > > _____________________________ > Marc Heiligers > > > -----Original Message----- > From: Per Westermark [mailto:pw...@ia...] > Sent: 30 October 2002 11:40 AM > To: Ioannis Vranos > Cc: Dev-C++ Mailing List > Subject: RE: [Dev-C++] Mixed Language Programming w/Dev-Cpp > > > I think there might be acoule of gotchas more to think about. > > Doesn't fortran have the reversed row/column order for multi-dimensional > arrays? > > Anyway, I assume that there already exists excellent FAQ documents for this > kind of problems. > > /Per W > > On Wed, 30 Oct 2002, Ioannis Vranos wrote: > > > > -----Original Message----- > > > From: dev...@li... > > > [mailto:dev...@li...] On Behalf > > > Of Scott Williams > > > Sent: Tuesday, October 29, 2002 10:34 PM > > > To: Dev-Cpp-Users@Lists. Sourceforge. Net > > > Subject: [Dev-C++] Mixed Language Programming w/Dev-Cpp > > > > > > > > > Hi, > > > > > > Wondering if anyone has experience with mixed language programming > > > and whether it can be done with Dev-Cpp? > > > > > > In particular, I'm writing a mathematical simulation in C > > > (using Dev-Cpp) > > > and would like to make using of some existing numerical > > > routines in Fortran. > > > My C knowledge is necessity-based self-taught and so limited; > > > don't know > > > anything about Fortran. Neither do I know much about using > > > compilers/linkers/etc in command line mode (which is why I > > > use Dev-Cpp--I > > > let it worry about that stuff). > > > > > > Still, I know that built-in to the gcc interface is the g77 > > > compiler so > > > there must be a way to compile the fortran source to an > > > object with g77 and > > > then link to & call the routines from C. Could it be as > > > simple as added > > > fortran source files to my Dev-Cpp project? If so, any > > > thoughts on how to > > > prototype the Fortran functions & subfunctions to make them > > > accessible to > > > the C calling routines? > > > > > > Well if you download the whole MINGW distribution it contains a > > Fortran compiler. In theory as i can think of it, if you compile your > > fortran source code files to .o files and use C-style declarations of > > those functions in your C source code, you should be able to use them. > > > > > > Ioannis > > > > * Ioannis Vranos > > * Programming pages: http://www.noicys.freeurl.com > > * Alternative URL: http://run.to/noicys > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dev-cpp-users mailing list Dev...@li... > > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users ===== |