How to link fortran 90 analysis with GALib

Edmanuel Eduardo Torres Amaris edmanuel.torres at ecopetrol.com.co
Thu Jul 25 12:46:19 EDT 2002


Hi Yuna

What do you need is to build a wrapper function definition in C++ of the
FORTRAN function. This look like

Fortran

SUBROUTINE MYSUBRUTINE(XX,YY,ZZ)

has to be declared in C++ as 

C++

extern "C"
{
	extern void mysubrutine_(float*, float*, float*);
}

Use this in this way

float x = 1.25;
float y = 0.52;
float z = 0.52;

mysubrutine_(&x, &y, &z);

________________________
Edmanuel Torres

-----Original Message-----
From: yuna [mailto:hyuna at CLEMSON.EDU]
Sent: Monday, July 22, 2002 4:11 PM
To: galib at MIT.EDU
Subject: How to link fortran 90 analysis with GALib


Hi all,

     I have a FE analysis code written in Fortran 90. Now I am trying to
connect my code to GALib. So my GA code should call the analysis problem.
Does somebody has any experience of how to do it? What problem will I meet
in the future?
    Thanks very much for the help.
Yuna

******************************************
Yuna Hu
125 EIB Fluor Daniel
Clemson, SC  29634
 (864) 656-7176 (O)
 (864) 654-4179 (H)
*******************************************

_______________________________________________
galib mailing list
galib at mit.edu
http://lancet.mit.edu/mailman/listinfo/galib



More information about the galib mailing list