From 0359ffb6c7c5b1b6e8b74f1dae5617f246613f5f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 11 Jun 2019 16:20:28 +0200 Subject: [PATCH] * Fix a link issue issues on Windows, probably related toircular gal<->common dependency. The fix used in commit 1e4abac57 to build kicad binary does not work for pcb_calculator. So I used a ugly but basic trick to force linking some undefined functions found in gal lib. This issue could be msys2 specific. --- kicad/CMakeLists.txt | 2 +- pcb_calculator/pcb_calculator_frame.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 10fce7fcc8..2949956d3f 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -76,7 +76,7 @@ else() target_link_libraries( kicad common gal - common + common #repeated due to a circular dependancy bewteen gal and common ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES} ) diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index 7da7d07724..cc5f1bbd5b 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #define KEYWORD_FRAME_POSX wxT( "Pcb_calculator_Pos_x" ) @@ -53,7 +54,6 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : PCB_CALCULATOR_FRAME_BASE( aParent ) { SetKiway( this, aKiway ); - m_currTransLine = NULL; m_currTransLineType = DEFAULT_TYPE; m_currAttenuator = NULL; @@ -61,6 +61,9 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_TWMode = TW_MASTER_CURRENT; m_TWNested = false; + SHAPE_POLY_SET dummy; // A ugly trick to force the linker to include + //some methods in code and avoid link errors + // Populate transline list ordered like in dialog menu list const static TRANSLINE_TYPE_ID tltype_list[8] = {