View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Mon Dec 22, 2014 6:28 am Post subject: WARNING - Class internal_state was previously defined in |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Dec 22, 2014 7:53 pm Post subject: |
|
|
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 |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Mon Dec 22, 2014 8:09 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Dec 22, 2014 8:23 pm Post subject: |
|
|
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 |
|
|
|