← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH 05/12] Avoid conflicting declaration for Pgm()

 

Patches 03 through 05 committed in 6841 through 6843. I took Marvin's version
for 6842. Thank you both.

On Fri, May 27, 2016 at 04:32:52PM +0200, Simon Richter wrote:
> 
> From: Simon Richter <geier@xxxxxxxxxxxxxxx>
> 
> This function has two conflicting definitions in the "kicad" executable and
> the other wrapper programs. As the kifaces can be loaded from either, this
> silently assumes compatible data layout for the PGM_KICAD and PGM_BASE
> types when passed by reference, which is valid only when the compiler is
> aware of the cast.
> 
> If the return type is encoded in the symbol name (such as when using the
> MSVC compiler), this also causes an error during linking, as the symbol
> names no longer match.
> ---
>  include/pgm_base.h  | 2 --
>  kicad/files-io.cpp  | 2 +-
>  kicad/kicad.cpp     | 9 ++++++++-
>  kicad/mainframe.cpp | 8 ++++----
>  kicad/menubar.cpp   | 6 +++---
>  kicad/pgm_kicad.h   | 3 ++-
>  kicad/prjconfig.cpp | 8 ++++----
>  7 files changed, 22 insertions(+), 16 deletions(-)
> 



References