Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Help: Mixed language C/f90; f90/C

ramani
초급자
404 조회수

Environment: Visual Studio 2005

Intel Fortran 9.1

Goal: Write two simple applications.

One has a C Main, and calls IVF, to do some calculations. Would like arrays and pointers passed between the two.

Two has a Fortran Main and calls visual C. Again would like to have arrays and pointers passed between the two.

I was able to do this a few years ago in CVF 6.1/ Visual Studio 6, but even then it took me some time.

Could someone please samples of .sln files with a C project, and a Fortran 90 project for each case. (I am disappointed that the sample files in IVF 9.1 do not have this already).

There appear to be issues regarding project settings, stdcall which someone's prior experience would help.

Any help is greatly appreciated.

0 포인트
1 응답
Steven_L_Intel1
404 조회수

You haven't shown your Fortran and C declarations nor said anything about what problems you are seeing. There are examples of C calling Fortran and Fortran calling C attached to this thread. There is also a chapter on mixed-language programming in the on-disk documentation.

The issue is likely not project settings - or if it is, it's to make up for something wrong you did in the code. You can do this without any special project settings other than ensuring that the run-time library types match.

0 포인트
응답