Discussion Locked

Conversion of Fortran code to C/C++

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We are trying to convert a legacy Fortran90/95 code into C++. During this
process, we are dealing with the mixed programming of Fortran90/95, C and
C++. In this connection, we have following queries/problems:

1. Can we access C++ member functions from Fortran code through objects? If
yes, what is the procedure?

2. How to access dynamically allocatable global data (variables, such as
ALLOCATABLE Arrays), declared in Fortran, from C++? Currently we are using
COMMON Blocks to access variables from C++, but COMMON Block does not allow
the ALLOCATABLE Arrays to be declared inside it.

We are using Intel FORTRAN Compiler 6.01 (IA32) and VC++ compiler.

1 reply

by zorwizard

I have had some experience with Fortran to C/C++ tranlations. For example an approx. 10,000 line legacy application, COGO (coordinate geometry).

Anyway, are you translating the entire program into C/C++ or just parts of it and then linking the objects together. I couldn't tell from your question. I hope I'm not being dense...

This discussion is closed to new replies.