473,327 Members | 2,007 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

access to class members from a Fortran subroutine

Hi,
I worked on a code based on C/C++/Fortran, with the main in C++.
I need to have access to some function members of a global class
object from inside the

More precisely, I have a global variable of type pointer.
The associated value is instanciated in the beginning of the main program
according to some datas.

The object is global since the informations carried have
to be accessed anywhere in the code
without having to modify everything.

I manage to access inside the C functions
the various functions members of this global variable using a wrapper.

But I need also to have the same access inside the Fortran subroutines.
I need mainly to call the functions members.

Does anybody have ideas about the strategy to use?
(C++ -> C -> Fortran ?)

What are the main difficulties when transfering vectors from C++
to Fortran ?

Thanks in advance

K. Pinchedez
Jul 22 '05 #1
0 1022

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: NM | last post by:
Hi all I am trying to link C++ and Fortran.I am not very familiar with Fortran. I have been successful in linking C++ and fortran using g++ and ifc for simple program. So adding _ to at the end of...
6
by: Adrian | last post by:
I am trying to pass the address of a C++ function into a Fortran routine to enable the Fortran routine to call this C++ function. I have to do it this way as our build process does not allow...
1
by: Sam | last post by:
Hello all I have a two dimensional array (the dimensions are not known) that needs to be passed to fortran from c++, allocate the dimensions of the array in fortran code, do some filling up of...
2
by: NM | last post by:
Hello all, I am supposed to do some mixed programming with c++ and fortran. I was succeeful in exchanging the 2D arrays from fortran to c++ and the other way, but was unable to that same with...
13
by: NM | last post by:
Sometimes ago I was having a problem in linking between C++ and Fortran program. That was solved (using input from this newsgroup) using the Fortran keyword "sequence" with the derived types (to...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
12
by: Bigdakine | last post by:
I don't know if this is the right forum for this, and if not please suggest one which fits. I have to call a fortran sub routine from a C main program. The fortran subroutine statement is ...
21
by: Cottonwood | last post by:
I want to call a C module from a Fortran program. Whatever I tried - the linker could not find the C module. I know about the leading underscore and switched even that off. I abstracted everything...
0
by: Gabriel Genellina | last post by:
En Wed, 19 Nov 2008 20:06:37 -0200, Yann Vonder <yann.vonderscher@gmail.comescribió: If you put tmod in both libraries, you'll have two copies of it, and two copies of the data. Can't you join...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.