View previous topic :: View next topic |
Author |
Message |
stfark1
Joined: 02 Sep 2008 Posts: 210
|
Posted: Mon May 08, 2017 2:18 am Post subject: Multiple Symbols |
|
|
Running a large program using Plato. When I do a build, the system responds with Multiple references to symbol _XXXXXX. I do not know where to look to eliminate the multiple references, I assume that they are in the built routine but how can I access or where would they be. I looked at all of the subroutines but there is no reference twice to the same routine? Sid Kraft |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Mon May 08, 2017 6:51 am Post subject: |
|
|
Two possibilities:
Could you be including a file twice in the build list ?
Can you produce a load map xxx.map ? This will list the symbols and the file where they are located, although not sure if this happens for a duplicate.
John |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Mon May 08, 2017 11:34 am Post subject: Re: Multiple Symbols |
|
|
stfark1 wrote: | Running a large program using Plato. When I do a build, the system responds with Multiple references to symbol _XXXXXX. |
Multiple references are never a problem, and are very common. You probably mean multiple definitions.
My preference is that, by default, the linker should not produce an EXE or DLL when when the input object files and libraries contain one or more instances of multiply defined or undefined symbols. In other words, there should be one and only one definition of each symbol.
It is also preferable if the linker does not place routines into the EXE that are never called. When building a DLL, of course, that preference does not apply.
As far as your build error is concerned, I suggest that you look at the linker command arguments in full. If that does not help, then you could generate and examine a map file. |
|
Back to top |
|
|
|