Objectmix
Tags Register Mark Forums Read

c++ shared access w/ Fortan 90 Module (data) : c++

This is a discussion on c++ shared access w/ Fortan 90 Module (data) within the c++ forums in Programming Languages category; I want to know how to access a Fortran 90 Module using c++. I am using Visual C++ .net 2003 and Intel Fortran 10.1. and I add the fortran .lib file to the linker inputs in visual c++. Is this correct : C header file foo.h #pragma pack(2) extern "C" char name[30]; extern "C" struct{ int x, float y, int z, }fortType; #pragma pack() Fortran module file fort.for module fortmodule character*30 name type fortType integer x real y integer z end type fortType Any help is greatly appreciated....


Object Mix > Programming Languages > c++ > c++ shared access w/ Fortan 90 Module (data)

c++ comp.lang.c++ usenet archive

Reply

 

LinkBack Thread Tools
  #1  
Old 11-21-2008, 03:51 PM
Junior Member
 
Join Date: Nov 2008
Posts: 1
josey1 is on a distinguished road
Default c++ shared access w/ Fortan 90 Module (data)

I want to know how to access a Fortran 90 Module using c++. I am using Visual C++ .net 2003 and Intel Fortran 10.1. and I add the fortran .lib file to the linker inputs in visual c++.

Is this correct :

C header file foo.h

#pragma pack(2)

extern "C" char name[30];

extern "C" struct{
int x,
float y,
int z,
}fortType;

#pragma pack()


Fortran module file fort.for

module fortmodule
character*30 name

type fortType
integer x
real y
integer z
end type fortType

Any help is greatly appreciated.
Reply With Quote
Reply

Thread Tools



All times are GMT -5. The time now is 05:26 PM.