VC++ calling fortran function and fortran function calling a c++ function 
Author Message
 VC++ calling fortran function and fortran function calling a c++ function

Hi Tech Gurus

For the past few days I am trying to connect fortran functions compiled
in MSPower station (4.0) from MSDev studio 97 (VC++). I have been
successful in calling fortran functions from vc++ by compiling fortran
functions in MSPower Station as libraries and linking them in vc++
(MSDev Studio).

But when I try to call a C function in dev studio from one of the
fortran functions through "INTERFACE TO SUBROUTINE" by passing
(C,REFERENCE), I am getting "Unresolved External Symbol _functionname ".

I need a solution for this very badly as my project design hangs on the
feasibility of calling a fortran function from vc++ which in turn calls
a c or c++ function to get few values / to use dialog resource.

Please HELP ME!!!!

THanks in advance

Ramanathan

--
Posted via http://www.*-*-*.com/



Mon, 06 Feb 2006 17:42:08 GMT  
 VC++ calling fortran function and fortran function calling a c++ function

Quote:
>For the past few days I am trying to connect fortran functions compiled
>in MSPower station (4.0) from MSDev studio 97 (VC++). I have been
>successful in calling fortran functions from vc++ by compiling fortran
>functions in MSPower Station as libraries and linking them in vc++
>(MSDev Studio).

The 97 devstudio is really VC5, linking FPS4 and VC5 stuff together is
problematic.  Go to eBay and find a copy of VC4, (cost ~US$10 to US$20)
and use VC4 with FPS4 -- OR -- find a copy of DVF5 (eBay $135 recently)
to use with VC5.  

Otherwise you will spend all your time futzing with internal compiler &
RTL matters and not on your problem.

Also, calling C from Fortran is easier than calling C++ for Fortran,
although Carsten Arnholm (?sp) has a site devoted to mixing
C++ and Fortran.

Sincerely
Kevin



Sun, 12 Feb 2006 22:15:40 GMT  
 VC++ calling fortran function and fortran function calling a c++ function

Quote:

> Also, calling C from Fortran is easier than calling C++ for Fortran,
> although Carsten Arnholm (?sp) has a site devoted to mixing
> C++ and Fortran.

Now that's not exactly true, as long as your C++ has a C interface.
It's just a matter of placing extern "C" in the right place.


Mon, 13 Feb 2006 00:57:09 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Calling functions from functions from functions ...

2. calling C++ function from Fortran: parameter passing

3. How to call C++ function from Fortran 90

4. C functions calling {C++/Ada/...} functions

5. Calling a fortran function from C++.

6. need to call a C++ function from within a fortran 77 code

7. How to find out name of calling function from called function

8. Call built-in functions of C++ from fortran

9. FORTRAN dynamic arrays used as parameters of functions called from C++

10. c++ calling fortran and fortran calling C++

11. Calling C callback function from Fortran g77

12. Calling C function from Fortran

 

 
Powered by phpBB® Forum Software