L
Luna Moon
Hi all,
As a C/C++ programmer, there are a few reasons to use Fortran:
(1) Fortran is very similar to Matlab and easy to port;
(2) Fortran has support of complex numbers and vectorized numbers and
the operations in Fortran are naturally element-wise, operating on a
whole vector.
(3) There are many scientific codes are in Fortran.
-------------
So how do I call Fortran program from my C program?
I am using MSVS. NET 2003, VisualC++ and Intel C++ therein, and also
the Intel Visual Fortran therein.
To give an example, I want to call a Fortran program from C++, which
is in its bare form, it is a function that evaluates something and
pass the results back; I also want to call C++ from Fortran, one
example is that many good numerical integral codes are in Fortran, but
I want to provide my integrand function in C++.
How to do these interfaces? Pointers and readings are appreciated!
Thanks for your help!
As a C/C++ programmer, there are a few reasons to use Fortran:
(1) Fortran is very similar to Matlab and easy to port;
(2) Fortran has support of complex numbers and vectorized numbers and
the operations in Fortran are naturally element-wise, operating on a
whole vector.
(3) There are many scientific codes are in Fortran.
-------------
So how do I call Fortran program from my C program?
I am using MSVS. NET 2003, VisualC++ and Intel C++ therein, and also
the Intel Visual Fortran therein.
To give an example, I want to call a Fortran program from C++, which
is in its bare form, it is a function that evaluates something and
pass the results back; I also want to call C++ from Fortran, one
example is that many good numerical integral codes are in Fortran, but
I want to provide my integrand function in C++.
How to do these interfaces? Pointers and readings are appreciated!
Thanks for your help!