- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
while moving from IFORT 18.0 to 18.1 i got a linking problem with submodules. The following Code produces a linker error LNK2019 "Unresolved external symbol "FOO" in function "MOD_A_mp_SOME_ROUTINE".
module MOD_A
type, public :: BAR_TYPE
contains
procedure, nopass :: foo => special_foo
end type BAR_TYPE
interface
module subroutine special_foo()
!DEC$ ATTRIBUTES DLLEXPORT :: special_foo
end subroutine special_foo
end interface
contains
subroutine some_routine()
!DEC$ ATTRIBUTES DLLEXPORT :: some_routine
type(BAR_TYPE) :: bar
call bar%foo()
end subroutine some_routine
end module MOD_A
submodule(MOD_A) MOD_A_S_GERADE
contains
module subroutine special_foo()
!DEC$ ATTRIBUTES DLLEXPORT :: special_foo
end subroutine special_foo
end submodule MOD_A_S_GERADE
This worked in previous compiler versions. It works without the submodule:
module MOD_A
type, public :: BAR_TYPE
contains
procedure, nopass :: foo => special_foo
end type BAR_TYPE
contains
subroutine special_foo()
!DEC$ ATTRIBUTES DLLEXPORT :: special_foo
end subroutine special_foo
subroutine some_routine()
!DEC$ ATTRIBUTES DLLEXPORT :: some_routine
type(BAR_TYPE) :: bar
call bar%foo()
end subroutine some_routine
end module MOD_A
Greetings
Wolf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I compiled your program with an internal compiler for 18.0, and it did not get an undefined symbol for FOO.
It was missing a MAIN routine, but that's not a surprise. :-)
This lets me believe that it is repaired, and the fix will be in the 18.0 update 2 kit, to be released soon.
As much as I would love to give an exact date for when "soon" is, I can't. All I can do is say "soon".
--Lorri
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See this thread, you may be running into a known issue with SUBMODULEs in 18.0 update 1:
https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/753974
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the link. I just noticed, that the DLLEXPORT attribute is not related to the problem. So it is propably exact the same problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I agree FortranFan, that this looks like the known submodule linking error introduced with 18.0.1. I filed my error at Intel's OSC on 12/06/2017. However, besides Lorri's answer in the thread above, I got no answer, whether PSXE 18 update 2 will solve this issue completely nor when update 2 will be released.
ps: another example can be found here: https://software.intel.com/en-us/node/740567
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I compiled your program with an internal compiler for 18.0, and it did not get an undefined symbol for FOO.
It was missing a MAIN routine, but that's not a surprise. :-)
This lets me believe that it is repaired, and the fix will be in the 18.0 update 2 kit, to be released soon.
As much as I would love to give an exact date for when "soon" is, I can't. All I can do is say "soon".
--Lorri
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page