Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Linking C/FORTRAN

connell
Principiante
2.542 Visualizações

I have a C library that has been set up with a -iface:cvf type interface. I.e. if I compile the FORTRAN with -iface:cvf then it link correctly. Unfortunately in the FORTRAN I have calls to other C and FORTRAN librariesthat do not use the cvf calling convention.

From what I have read I need to set up an interface block with a CFV type compiler directive. I.e. call some routines with thecvf type convention. Something like

interface
subroutine gm_start_cad(igeofile,lugeo_in,isemod,split2)
c CDEC$ ATTRIBUTES CVF :: gm_start_cad
character*80 igeofile
integer lugeo_in, isemod
logical split2
end subroutine gm_start_cad
end interface

Unfortunately the compiler does not recognise the CVF option. I have tried various other combinations (DECORATE, ALIAS, STDCALL) but cannot get it to link. Does anyone know what set of directives I need to mimick the cvf convention? Or is there another way of doing this?

0 Kudos
21 Respostas
Steven_L_Intel1
Funcionário
321 Visualizações
I think so, except for character arguments where that will have the effect of not passing the length.
Responder