forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Linker problem

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato
View previous topic :: View next topic  
Author Message
Rainer



Joined: 13 Mar 2006
Posts: 43

PostPosted: Tue Mar 14, 2006 10:21 am    Post subject: Linker problem Reply with quote

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. Smile

Rainer
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Mar 14, 2006 12:32 pm    Post subject: Linker problem Reply with quote

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
View user's profile Send private message AIM Address
Rainer



Joined: 13 Mar 2006
Posts: 43

PostPosted: Tue Mar 14, 2006 12:39 pm    Post subject: Linker problem Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Mar 14, 2006 3:49 pm    Post subject: Linker problem Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group