Hmm, I'm going way back but remember something like Fortran uses pascal calling convention. The difference is the order the arguments are placed on the stack. If I remember right C goes right to left and relies on the caller to do stack clean up. And pascal/fortran/basic all use left to right and relies on the called function to do stack clean up.
With C++ calling fortran, I think you have prototype the functions like this
extern "C" int myfunc(int x) __attribute__ ((stdcall));
|