Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Question on static Libs

rahzan
New Contributor I
549 Views

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 Kudos
4 Replies
Jugoslav_Dujic
Valued Contributor II
549 Views
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 Kudos
Steven_L_Intel1
Employee
549 Views
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 Kudos
rahzan
New Contributor I
549 Views

Thanks,

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

Tim

0 Kudos
Steven_L_Intel1
Employee
549 Views
Yes, since that's the global name the linker sees.
0 Kudos
Reply