Re: how to call C (non-intel C compiler) from ifort (intel fortran)?
- From: "Jugoslav Dujic" <jdujic@xxxxxxxxx>
- Date: Fri, 28 Sep 2007 13:02:34 +0200
ktrchang@xxxxxxxxx wrote:
| Hi there,
|
| I need to call C within fortran code. I could compile and link using
| Visual Fortran
| and Visual C++.
|
| Fortran code is like:
| .
| CALL SUB1(arg1, .......)
| .
| .
| C code is like:
| #define sub1 __stdcall SUB1
| .
| void sub1 ( arg1, ........)
| .
| .
| Now I have to use another machine with Intel Fortran (ifort) with .NET
| (Visual Studio
| 2005). When I linked, I got error message "unresolved external symbol
| _SUB1".
| What is the right way to do? (For using ifort with icc, an example is
| shown in
|
http://www.ncsa.uiuc.edu/UserInfo/Resources/Hardware/Intel64Cluster/Doc/fortrancallc.html)
|
| Any help is very much appreciated.
Intel changed the default calling convention from __stdcall to __cdecl,
when it took over the CVF. So, either adjust it on C side, or change the
calling convention on Fortran side. In addition, the way how CHARACTER
arguments are passed is also changed -- the hidden length is now passed
at the end of argument-list rather than immediately following the string
argument.
--
Jugoslav
___________
www.xeffort.com
Please reply to the newsgroup.
You can find my real e-mail on my home page above.
.
- References:
- Prev by Date: Re: Intel Fortran and Ms Studio .net
- Next by Date: Re: All input data are in a line : tricky I/O Fortran error
- Previous by thread: Re: how to call C (non-intel C compiler) from ifort (intel fortran)?
- Index(es):
Relevant Pages
|