Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Question on static Libs

rahzan
Nouveau contributeur I
1 410 Visites

in CVF6.6B I have a module, say:

module m
contains
subroutine test1(rx,ix)
!DEC$ ATTRIBUTES DLLEXPORT ,ALIAS:'SimpleTest' :: TEST1
integer(4), intent(in) :: ix
real(4), intent(inout) :: rx
rx=rx**ix
end subroutine test1
end module m

I make a DLL out of this using:
df /check:bounds /arch:host /threads /traceback /dll filename.F90 /link

If I make a static lib for USE in other CVF code using:
1. df /c /check:bounds /arch:host /libs:dll /nolibdir /traceback filenameF90
2. lib filename.obj

Will the fact that I have left in the line:
!DEC$ ATTRIBUTES DLLEXPORT ,ALIAS:'SimpleTest' :: TEST1

make any difference in the creation of the static lib?

Thanks in adv.
Tim

0 Compliments
4 Réponses
Jugoslav_Dujic
Précieux contributeur II
1 410 Visites
In a word, No.
I prefer using .def files to DLLEXPORT directives, to avoid such "code pollution". But I must say I don't practice what I preach :-).
Jugoslav
0 Compliments
Steven_L_Intel1
Employé
1 410 Visites
The only effect I think you will see is if you USE the module in a statically linked application, you'll get a warning from the linker about a local definition of an imported symbol. This is harmless and you can ignore it.
0 Compliments
rahzan
Nouveau contributeur I
1 410 Visites

Thanks,

What symbol will there be a warning on? the alias?

Tim

0 Compliments
Steven_L_Intel1
Employé
1 410 Visites
Yes, since that's the global name the linker sees.
0 Compliments
Répondre