Re: Calling a fortran subroutine from Visual C++
- From: "William DePalo [MVP VC++]" <willd.no.spam@xxxxxxxx>
- Date: Thu, 16 Jun 2005 19:23:44 -0400
"Ray J." <Ray J.@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:51F7C3A6-1708-40F7-ABB6-F96CBC142300@xxxxxxxxxxxxxxxx
>I have a C++ program written and compiled on Solaris 8 with gcc. With gcc
> lets me compile fortran code along with the C++ program to be able to call
> the fortran code as a subroutine. The specifications for this project
> have
> changed and I am porting the C++ code to Visual C++. Is there a way to
> call
> fortran code from a C++ program compiled with Visual C++?
It's not clear to me what tools you have. Do you have a Fortran compiler for
Win32? If you do, and if it allows you to build a DLL, then the expedient
thing to do is export your function from the DLL and to call it from a C++
executable. Assuming compatible types and calling conventions VC++ should
have no trouble calling into an external DLL.
I don't believe that MS sells a Fortran compiler. You will find some free
Fortran compilers here:
http://www.thefreecountry.com/compilers/fortran.shtml
though I should tell you that I have no experience with any of them.
Regards,
Will
.
- Follow-Ups:
- Re: Calling a fortran subroutine from Visual C++
- From: Norman Diamond
- Re: Calling a fortran subroutine from Visual C++
- References:
- Calling a fortran subroutine from Visual C++
- From: Ray J.
- Calling a fortran subroutine from Visual C++
- Prev by Date: RE: fatal error C1001: INTERNAL COMPILER ERROR
- Next by Date: How to get rid of scrollbars in datagrid?
- Previous by thread: Calling a fortran subroutine from Visual C++
- Next by thread: Re: Calling a fortran subroutine from Visual C++
- Index(es):
Relevant Pages
|