C'mon, sundialsvcs. Please give bigapple a break.
I think we're both saying pretty much the same thing, and I think we both want to make it as simple and easy as possible for bigapple to find the right solution. My two points were:
1. runtime library compatibility is a big issue
a) Ideally, bigapple can find a GNU FORTRAN compiler to use with his GNU C. That should minimize
risk of library incompatibilities.
b) Alternatively, bigapple can find an IBM xlc compiler to go with his xlf compiler. Either a) or b) should work fine.
2. The data types passed between FORTRAN an C need to match.
a) In this case, 'C' is undoubtedly expecting a 32 bit int, and bigapple is instead passing a 16-bit "integer*2"
b) I still suggest that he change his FORTRAN code to integer*4
3. Calling order and linkage (C vs Pascal stack order, upper vs lower vs mixed case names, default by value
or by reference, etc etc) are all potentially significant. But these all tend to be COMPILER SPECIFIC and,
I thought the most important suggestion was to get him on a SINGLE compiler family for BOTH LANGUAGES.
In my experience, things "just work" when both compilers are in the same family (in other words, most
compiler families share the same back ends and, consequently, most object binaries are completely
interoperable).
4. The following links might be helpful:
GF77/G95 (GNU FORTRAN 77 and FORTRAN 95):
http://gcc.gnu.org/onlinedocs/gfortran/
IBM white paper on linking IBM FORTRAN programs with IBM C
http://publib.boulder.ibm.com/doc_li.../FORTRANnC.htm
IBM/AIX main documentation page:
http://publib.boulder.ibm.com/cgi-bin/ds_form