* 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.
This commit is contained in:
jean-pierre charras 2019-06-11 16:20:28 +02:00
parent 9625cea57f
commit 0359ffb6c7
2 changed files with 5 additions and 2 deletions

View File

@ -76,7 +76,7 @@ else()
target_link_libraries( kicad target_link_libraries( kicad
common common
gal gal
common common #repeated due to a circular dependancy bewteen gal and common
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
${GDI_PLUS_LIBRARIES} ${GDI_PLUS_LIBRARIES}
) )

View File

@ -24,6 +24,7 @@
#include <pcb_calculator.h> #include <pcb_calculator.h>
#include <UnitSelector.h> #include <UnitSelector.h>
#include <bitmaps.h> #include <bitmaps.h>
#include <geometry/shape_poly_set.h>
#define KEYWORD_FRAME_POSX wxT( "Pcb_calculator_Pos_x" ) #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 ) PCB_CALCULATOR_FRAME_BASE( aParent )
{ {
SetKiway( this, aKiway ); SetKiway( this, aKiway );
m_currTransLine = NULL; m_currTransLine = NULL;
m_currTransLineType = DEFAULT_TYPE; m_currTransLineType = DEFAULT_TYPE;
m_currAttenuator = NULL; m_currAttenuator = NULL;
@ -61,6 +61,9 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_TWMode = TW_MASTER_CURRENT; m_TWMode = TW_MASTER_CURRENT;
m_TWNested = false; 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 // Populate transline list ordered like in dialog menu list
const static TRANSLINE_TYPE_ID tltype_list[8] = const static TRANSLINE_TYPE_ID tltype_list[8] =
{ {