- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
i've a function in a module which i want to export. till now, i was using dllexport method. but this method works well on functions that are not in a module. i noticed that module functions are exported with a prefix of the module name (like modname..functionname) this is not sth. idesire.
ifmay i give an example;
Code:
function Add(x,y) !DEC$ ATTRIBUTES DLLEXPORT::Add implicit none integer(4) :: x,y,Add Add=X+y end function module modSample contains function Minus(x,y) !DEC$ ATTRIBUTES DLLEXPORT::Minus implicit none integer(4) :: x,y,Minus Minus=x-y end function end module
when i compile this dll, and have a look in it with dependency walker, i see that two functions are exported,
Add
modSample..minus
how can i change the name of "modSample..minus" to only "minus"
any help would be appreciated. thanks in advance
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
5 Respuestas
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
!DEC$ ATTRIBUTES ALIAS:"MINUS" :: MINUS
You may want to add "decoration" (leading underscore) as required by whatever is calling the routine.
You may want to add "decoration" (leading underscore) as required by whatever is calling the routine.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
dear sblionel;
Could you please give a.def samle for the same project ?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Why a .def file? Using the attributes is better. You'll need the ALIAS attribute anyway. It's not clear what you want from a .def file.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I want .def file because i've lot's of functions to edit (100+). With a .def file it may be easier to determine the exported functions.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
You can read about the syntax of .def files in the MSDN documentation. I think you would do something like:
EXPORTS
ADD=MODULENAME_mp_ADD
but you'll have to experiment to see if you get the right effect.
EXPORTS
ADD=MODULENAME_mp_ADD
but you'll have to experiment to see if you get the right effect.

Responder
Opciones de temas
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla