- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
hello,
I am using Visual Fortran Composer XE11 with Microsoft Visual Studio 2008. First of all, i would like to know if the FORTRAN compiler supports C calling convention.
My aim is to use the C API of an installed program called MOSEK through the fortran main code which i have already used through c++ code. I want to mention that for the running of this C code I have to set as header files "".h, which for sure I will need in the cooperation of 2 codes (C,Fortran). If this can not be done I wonder if it is possible to call a C program as a subroutine from Fortran code. thank you in advance.
hello,I am using Visual Fortran Composer XE11 with Microsoft Visual Studio 2008. First of all, i would like to know if the FORTRAN compiler supports C calling convention.My aim is to use the C API of an installed program called MOSEK through the fortran main code which i have already used through c++ code. I want to mention that for the running of this C code I have to set as header files "".h, which for sure I will need in the cooperation of 2 codes (C,Fortran). If this can not be done I wonder if it is possible to call a C program as a subroutine from Fortran code.thank you in advance.
- Balises:
- Intel® Fortran Compiler
Lien copié
2 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
ifort iso_c_binding supports cdecl, which has been "the" Microsoft C ABI for over 10 years, except possibly for Windows API access. There are examples of the latter supplied with the compiler.
It's always possible to write a C wrapper to call by cdecl, according to iso_c_binding (no C++ mangling) or otherwise, and use that to make a call via another calling convention. There are also examples including C++ symbol mangling.
It's always possible to write a C wrapper to call by cdecl, according to iso_c_binding (no C++ mangling) or otherwise, and use that to make a call via another calling convention. There are also examples including C++ symbol mangling.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Intel Visual Fortran uses the C calling convention by default. It supports all of Fortran 2003's C Interoperability features, which I recommend you use. I started a series of blog posts on this - you can find the first episode here.
Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable