diff --git a/compiler/psub.pas b/compiler/psub.pas index ef78c5f22a..84320962d6 100644 --- a/compiler/psub.pas +++ b/compiler/psub.pas @@ -1469,8 +1469,16 @@ implementation (pd.hasforward) and not( assigned(pd.import_dll) and - (target_info.system in [system_i386_win32,system_i386_wdosx, - system_i386_emx,system_i386_os2,system_arm_wince,system_i386_wince]) + ( + ( + GenerateImportSection and + (target_info.system in [system_i386_win32]) + ) or + ( + target_info.system in [system_i386_wdosx,system_i386_emx,system_i386_os2, + system_arm_wince,system_i386_wince] + ) + ) ) then begin s:=proc_get_importname(pd);