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 

WARNING - Class internal_state was previously defined in

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



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Mon Dec 22, 2014 6:28 am    Post subject: WARNING - Class internal_state was previously defined in Reply with quote

I'm getting this warning because two of the "C" libraries I use define static data that is global in scope. I don't know if they conflict (i.e. overlay each other), or this message is simply telling me the area allocated is now bigger and the static data for each library is separated.

Right now, it does not appear to be a conflict, but I'd like to get a clarification on this, if anyone knows.

Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Mon Dec 22, 2014 7:53 pm    Post subject: Reply with quote

As I understand it, you can not share static data between DLLS etc. But SLINK will warn you if you share a class name and the size of the class varies from one DLL etc to another.
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Mon Dec 22, 2014 8:09 pm    Post subject: Reply with quote

Right now, they are not DLL's. They are build as libraries and thus the areas might overlap.

That's what I was afraid of. I'll do some more investigation into the original static data area in the two modules. If they overlay, then there is a potential issue that I think I may be able to overcome. If I cannot overcome this, I may have to "bite the bullet" and go for the DLL solution to prevent problems.

Thanks, Paul.
Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Mon Dec 22, 2014 8:23 pm    Post subject: Reply with quote

Libraries (both static and dynamic) can be used to share functions but not data. Data must be passed as function arguments. A DLL or an exe can have its own data but that data can not be made directly visible to both.
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 -> General 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