Re: strange linking problem
- From: Michel OLAGNON <molagnon@xxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 09:30:23 +0200
nicolasbock@xxxxxxxxx wrote:
To make this even stranger, I found that the following modifications to Parameters.F90 and Main.F90 make both version of the program work
in file Parameters.F90:
MODULE Parameters IMPLICIT NONE Character (len=100) :: test = "This is a test" CONTAINS subroutine nop () return end subroutine nop END MODULE
in file Main.F90:
PROGRAM Main USE Parameters IMPLICIT NONE
write (*, *) "printing test: ", test
END PROGRAM Main
subroutine nopMain ()
use Parameters implicit none
call nop () return
end subroutine nopMain
No executable code in the module results in no reference from the program to the module object file, so the linker does not bring it in. The "problem" has been known for decades by some who couldn't get their block data to be linked into the program.
.
- Follow-Ups:
- Re: strange linking problem
- From: nicolasbock
- Re: strange linking problem
- References:
- strange linking problem
- From: nicolasbock
- Re: strange linking problem
- From: nicolasbock
- strange linking problem
- Prev by Date: Re: why doesn't this compile ?
- Next by Date: Re: why doesn't this compile ?
- Previous by thread: Re: strange linking problem
- Next by thread: Re: strange linking problem
- Index(es):