Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any example of how to pass user-derived types of fortran to c?

Status
Not open for further replies.

marywah

Programmer
Feb 19, 2003
2
CA
I tried to follow the programmer's guide using a module to access the derived types of compaq fortran in c program in MS studio 6. It only taught how to define the data but doesn't mention how to access. So I tried to use "interface...end interface" to call the c program with the derived type. It doesn't work at all.
Anyone has a good example to show me how? Thanks a lot.

marywah
 
Basically you cannot mix languages if the compilers come from different manufacturers because the object code and linkers they produce is not compatible.

Visual studio 6 is a 32 bit environment. If the Fortran compiler is a 16 bit one, it won't gel either.
 
thanks xxb. I'm using Compaq visual fortran v6 and c in vc++ v6 under the microsoft visual studio 6. Hence, there's way for mixing c and fortran together.
Thanks anyway.
I already find a solution to access the data from fortran by c.

marywah.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top