🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #4628

Re: How to link Fortran with c++ ??

#4628
From: Niels Hilbrink
Date: Thu, 01 Feb 1996 09:31
47 lines
2184 bytes
Carsten Arnholm wrote:
> 
> Niels Hilbrink <Niels@imacsg1.epfl.ch> wrote:

> >I have to link a piece of fortran code with c++ code but since if never
> >done that before I'd like to know a) can it be done and b) is it
> >difficult.
> >
> >Everything concerning this subject is welcome.
> 
> Hi there,
> 
> Mixed language programming (C++/FORTRAN 77) is not as hard as
> it may seem.
> 
> The only non-trivial problem you must solve is fortran CHARACTERs.
> You need to write a minimal CHARACTER class in C++.
> 
> If you require single-source portability, it becomes slightly
> more complicated, but not impossible.
> 
> Below follows a summary of some stuff that I have done, plus
> some additional thoughts.

As understand it, this is the way to go if you want to call fortran routines 
in a c++ code. But what if you  want to do go the other way around ? 

So how do I call an data member from a c++ class in fortran ?
say I want to call a member function called GetData() in fortran so
how do I transplate Class->GetData() in fortran ?

Thanxs,
Niels

-- 

   The most overlooked advantage to owning a computer is 
   that if they foul up there's no law against wacking   
   them around a little.                                 

------------------------------------------------------------
Koen D'Hondt			              Niels Hilbrink
koen@dutlhs1.lr.tudelft.nl      niels@dutlcc3.lr.tudelft.nl

**** Ripley Software Development ****
(finger niels@dutlcc3.lr.tudelft.nl for more information.)
------------------------------------------------------------
Technical Details
Message-ID: <3110887E.41C6@imacsg1.epfl.ch>
Path: arc1-ca.pugleaf.net!swidir.switch.ch!epflnews!news
References: <310DD74F.59E2@imacsg1.epfl.ch> <4env5h$3ai@nms.telepost.no>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!swidir.switch.ch!epflnews!news
From: Niels Hilbrink <Niels@imacsg1.epfl.ch>
Newsgroups: comp.lang.fortran,comp.lang.c++
Subject: Re: How to link Fortran with c++  ??
Date: Thu, 01 Feb 1996 10:31:42 +0100
Organization: EPFL
Message-ID: <3110887E.41C6@imacsg1.epfl.ch>
References: <310DD74F.59E2@imacsg1.epfl.ch> <4env5h$3ai@nms.telepost.no>
NNTP-Posting-Host: imacsg2.epfl.ch
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0b6a (X11; I; IRIX 5.3 IP22)
To: Carsten Arnholm <ca@sesam.dnv.no>