Click to See Complete Forum and Search --> : Beginner


chas
October 16th, 2004, 11:15 AM
I have written and complied several programs in Fortran.

However, I now wish to add on on some front end GUIs and GUIs for post processing the output from the Fortran.

I have used Visual Fortran to create the GUIs but am considering using C++ .NET since eventually I would like to market the software.

I have several questions but my initial concern is regarding;

Will C++ be able to interface with the Fortran source coding for both datainput and dataoutput or will I have to change the Fortran source to C++?

Mick
October 16th, 2004, 01:13 PM
<moved thread>
Please do not post your questions in the Visual C++ FAQ forums. It is a moderated [posting wise] forum.

Thank you.

NoHero
October 16th, 2004, 02:00 PM
I have written and complied several programs in Fortran.

However, I now wish to add on on some front end GUIs and GUIs for post processing the output from the Fortran.

I have used Visual Fortran to create the GUIs but am considering using C++ .NET since eventually I would like to market the software.

I have several questions but my initial concern is regarding;

Will C++ be able to interface with the Fortran source coding for both datainput and dataoutput or will I have to change the Fortran source to C++?


MSDN
The __pascal, __fortran, and __syscall calling conventions are no longer supported. You can emulate their functionality by using one of the supported calling conventions and appropriate linker options.

WINDOWS.H now supports the WINAPI macro, which translates to the appropriate calling convention for the target. Use WINAPI where you previously used PASCAL or __far __pascal.


So I think you might expirience difficulties calling your Fortran routines. The best way would be to pack the Fortran routines into a DLL (I am not shure if Fortran can do such things, or if there is a Windows version of Fortran and if Fortran supports the calling convention __stdcall) and access them by using C++.

@Mick: The FAQ Forum supposed to be very magnetic, huh? :D