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

The linker cannot resolve non-scalar parameters from ISO_FORTRAN_ENV

John4
Valued Contributor I
629 Views

Hi,

Maybe it's just me, but I've already tried the following in a couple of (Linux) machines and the result is the same ---i.e., the linker (ld) cannot resolve the references to ISO_FORTRAN_ENV non-scalar parameters.

[fortran]use iso_fortran_env

print '(A, *(i0, :, ", "))', 'CHARACTER_KINDS = ', CHARACTER_KINDS
print '(A, *(i0, :, ", "))', 'INTEGER_KINDS = ', INTEGER_KINDS
print '(A, *(i0, :, ", "))', 'LOGICAL_KINDS = ', LOGICAL_KINDS
print '(A, *(i0, :, ", "))', 'REAL_KINDS = ', REAL_KINDS

end[/fortran]
Am I doing something wrong here or it's just a compiler bug?

0 Kudos
1 Reply
Steven_L_Intel1
Employee
629 Views
Not a "compiler" bug, but an error in how we built the libraries, it would seem. I see the same error on Windows. The global symbol isn't always needed, but in this case it is. This was reported a bit earlier as issue DPD200141924 and I expect it to be fixed in a future update.

A workaround is to compile the source for iso_fortran_env.f90 and link the resulting .o into your program.
0 Kudos
Reply