View previous topic :: View next topic |
Author |
Message |
Rainer
Joined: 13 Mar 2006 Posts: 43
|
Posted: Tue Mar 14, 2006 10:21 am Post subject: Linker problem |
|
|
Hi,
I have the following problem, using Plato 3.15 and FTN 95 v.4.6.0:
I have a module that uses CLRWIN and use that module in other modules, forming a hierarchy of usages that I'm familiar with from C++. The source code compiles with no errors, but the linker says
"WARNING - Module component WINDOW-UPDATE@ has been defined differently here than previously in object file [..], with [..] being the object file corresponding to the main program file. There are about 3-4 of these warning messages. But they don't specify where "here" is and if I double-click on a warning I get a window repeating it and adding "This file does not exist. Your current options prevent opening." (which is quite a weird statement by the way).
Since the main program does little else than include all the other modules, I found out, by outcommenting certain modules and procedures, that the problem is caused by calls to WINDOW_UPDATE@ in some routines, but apparently not all. This made me suspect that it has something to do with the order of module usages.
So I theorized there may be a problem with using the CLRWIN module via different dependency paths, resulting in it being used several times through several paths. I rewrote the usage structure to have a purely linear hierarchy, but the problem remained. It even caused an "Access violation" compiler error with a lot of addresses and C functions given of which I don't know how to use them to find the error in the Fortran code. When I outcommented the use of the two modules highest in the hierarchy, the Access violation error disappeared and I had only the linker warning again.
I should perhaps mention that I'm using the IMPLICIT NONE global option and that I have a couple of "missing symbol" warnings as well that I haven't fully checked out yet.
I guess the first problems described is the more important one.
Thanks for any help you can give me.
Rainer |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7923 Location: Salford, UK
|
Posted: Tue Mar 14, 2006 12:32 pm Post subject: Linker problem |
|
|
Rainer
window_update@ is a subroutine that takes a single argument which is a variable of any type.
It is therefore acceptable to use window_update@ in different ways in different contexts, maybe (say) with an INTEGER argument in one place and a REAL argument somewhere else.
At the same time the linker will check all function/subroutine calls for consistent usage and will issue and warning when the usage is not consistent. In the case of window_update@ the warning can usually be ignored. There is no harm in checking that you have used window_update@ correctly but then the warning can be ignored.
Although there is no reason to worry about Plato3 in this context, it is true to say that the dependency checking in Plato3 has been significantly improved in more recent versions. |
|
Back to top |
|
|
Rainer
Joined: 13 Mar 2006 Posts: 43
|
Posted: Tue Mar 14, 2006 12:39 pm Post subject: Linker problem |
|
|
Thank you for the fast response, Paul.
Is there a way to suppress this kind of warning messages ? I checked the button in the project properties to ignore warnings. But since warnings still show up occasionally I assumed these were of a more serious type.
Rainer |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7923 Location: Salford, UK
|
Posted: Tue Mar 14, 2006 3:49 pm Post subject: Linker problem |
|
|
Rainer
No, I do not think there is a way to suppress linker warnings.
The check box in the properties dialog suppresses compiler warnings. |
|
Back to top |
|
|
|