View previous topic :: View next topic |
Author |
Message |
stfark1
Joined: 02 Sep 2008 Posts: 225
|
Posted: Mon Oct 28, 2024 7:39 pm Post subject: C++ Link |
|
|
I have a large Fortran progrqm and I want to build the executable routine with a c++ program output module, how canthis be accomplished? Sid Kraft |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1238 Location: Morrison, CO, USA
|
Posted: Mon Oct 28, 2024 11:10 pm Post subject: |
|
|
I've done quite a bit of mixed-mode using FTN95. I'm not sure what you are referring to as "C++ output module".
Do you mean that all output from FTN95 program units uses the C++ pre-defined units?
A bit more detail would be most helpful.
I have "C" routines that I call from Fortran (some then call "C++" routines), and, although I have not yet needed to, it is certainly possible to call FTN95 from "C" or "C++". |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8067 Location: Salford, UK
|
Posted: Tue Oct 29, 2024 8:11 am Post subject: |
|
|
For a Win32 application, calling C/C++ from FTN95 is described in the help manual (FTN95.chm) under Win32 platform->Mixed language programming->Calling FTN95 from C/C++.
In principle you can do the same for an x64 application but in this case the C++ compiler (SCC) has some limitations, is not supported and does not currently have debugging options.
As a general rule, you should only use mixed language programming if you need to perform some task that is not possible in Fortran. |
|
Back to top |
|
|
|