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

ffunction-sections or /Gy for ifort


I have a problem with a Fortran DLL that is pulling unwanted DLL dependencies from other sections of the code. That is, the same set of objects (100+) is used to build an executable with a full set of features and a DLL that exposes a few select functions for a separate viewer program. The functions from the external DLL are not called on any part of the code path that I want to export in my own DLL but there is almost certainly some contamination from objects that contain both code my DLL needs and code that is only used in the executable.


I am fairly convinced that this is a linking issue and that I need to use function-level linking (instead of object-level) to resolve this. This is well-documented as /Gy and /OPT:REF in Windows; the Intel C/C++ Compiler supports this:


But my code is in Fortran and I could not find the equivalent ifort flag for /Gy; without it, /OPT:REF has nothing to work with.


Is this supported ? Because untangling the original objects would be a massive undertaking....

0 Kudos
1 Reply

Sorry. Neither ifort nor ifx support /Gy. 


0 Kudos