- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I am using a lib for a dll (newbie in fortran)
I get the link error
Severity Code Description Project File Line Suppression State Error error LNK2019: unresolved external symbol _TEXT@24 referenced in function _TEXTPU PLO.obj
In dll the functio is defined according dumpbin
Exports ordinal name _LINEWIDTH _MARKER _PLOT_INI _TEXT
What is the meaning of @24? What must I do that the linker is using _TEXT instead of _TEXT@24
Thanks
Urs
- Marcas:
- Intel® Fortran Compiler
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
@24 means that the caller of TEXT is using the STDCALL calling convention, which is not the default in Intel Fortran. The 24 indicates the number of bytes pushed on the stack for arguments that it expects the called routine to pop off before return. The calling conventions must be consistent or else you'll get stack corruption.
Are you using the /iface:cvf option or an ATTRIBUTES STDCALL directive in the source of TEXTPU?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Try adding the alias compiler directive
SUBROUTINE TEST() !DEC$ ATTRIBUTES DLLEXPORT :: TEST !DEC$ ATTRIBUTES ALIAS:'TEST :: TEST IMPLICIT NONE ! Code Starts Here END SUBROUTINE
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
TEXT is already being exported. Either it doesn't have the STDCALL attribute or it has a different number of arguments than in the caller (something I neglected to mention in my earlier response.)
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thank You
I had set the calling convention to CVF. After changing to default it works fine.

- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora