- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I am still relatively new to Fortran and am porting a mixed language program from IA32 to Intel64. In the original version, the C++ code makes calls to the Fortran using [C,ALIAS:'_nameOfSubroutine']. When the program tries to link under Intel64, all of these calls are listed as unresolved external symbols. I am assuming this has to do with the size of the address. Is there a way to implement this in the Intel64 platform?
- 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é
No, it has to do with default name decoration conventions which are different on the 64-bit platform. Briefly, there is no leading underscore as there is on IA-32. If you drop the underscore, it should work.
If you want to write code that works on both platforms,. remove the MS PowerStation square bracket attribute syntax and add this line instead:
!DEC$ ATTRIBUTES C, DECORATE, ALIAS:"nameOfSubroutine" :: nameOfSubroutine
Ideally, I'd recommend using the new BIND(C,NAME="nameOfSubroutine") F2003 feature but a current compiler bug would result in the same problem you have now (because the compiler assumes the name you specify is fully decorated.) That will be fixed in the next update (or so I am told.)
If you want to write code that works on both platforms,. remove the MS PowerStation square bracket attribute syntax and add this line instead:
!DEC$ ATTRIBUTES C, DECORATE, ALIAS:"nameOfSubroutine" :: nameOfSubroutine
Ideally, I'd recommend using the new BIND(C,NAME="nameOfSubroutine") F2003 feature but a current compiler bug would result in the same problem you have now (because the compiler assumes the name you specify is fully decorated.) That will be fixed in the next update (or so I am told.)
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thanks, problems solved.
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