On Thu, Jul 26, 2018 at 4:49 PM, Valerio Messina via Gerbv-devel
<gerbv-devel@lists.sourceforge.net> wrote:
> hi,
> I just tried to build the gerbv-2.6.2.tar.gz release sources:
> https://sourceforge.net/projects/gerbv/files/gerbv/gerbv-2.6.2/
> on MSYS2/Win both 64 and 32 bit.
>
> In make stage, it complaint about:
> pick-and-place.c:182: undefined reference to `screen'
> Below see the complete errors.
> How can be fixed?

Try this patch.
From dd8f9fabd69a8d16e55116b5038ae6604742eec3 Mon Sep 17 00:00:00 2001
From: Sergey Alyoshin <alyoshi...@gmail.com>
Date: Sat, 16 Nov 2013 15:31:21 +0400
Subject: [PATCH] pnp: can't use screen units

Pratially undo commit bb318fbf3a1242eada61af47cec8744823e0645c
---
 src/pick-and-place.c | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/src/pick-and-place.c b/src/pick-and-place.c
index ab50337..23d1cd1 100644
--- a/src/pick-and-place.c
+++ b/src/pick-and-place.c
@@ -56,7 +56,6 @@
 
 #include "gerbv.h"
 #include "gerber.h"
-#include "main.h"
 #ifdef RENDER_USING_GDK
   #include "draw-gdk.h"
 #else
@@ -161,36 +160,22 @@ pick_and_place_reset_bounding_box (gerbv_net_t *net) {
 }
 
 //! Parses a string representing float number with a unit, default is mil
-static double 
-pick_and_place_get_float_unit(char *str)
+static double
+pick_and_place_get_float_unit(const char *str)
 {
     double x = 0.0;
     char unit[41];
-    extern gerbv_screen_t screen;
 
     /* float, optional space, optional unit mm,cm,in,mil */
     sscanf(str, "%lf %40s", &x, unit);
     if(strstr(unit,"in")) {
 	;
-    } else if(strstr(unit, "mil")) {
-	x /= 1000;
     } else if(strstr(unit, "cm")) {
 	x /= 2.54;
     } else if(strstr(unit, "mm")) {
 	x /= 25.4;
-    } else { /* default to GUI units */
-	switch (screen.unit) {
-	case GERBV_INS:
-	    break;
-	case GERBV_MILS:
-	    x /= 1000;
-	    break;
-	case GERBV_MMS:
-	    x /= 25.4;
-	    break;
-	default:
-	    assert(screen.unit);
-	}
+    } else { /* default to mils */
+	x /= 1000;
     }
 
     return x;
-- 
2.18.0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gerbv-devel mailing list
Gerbv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gerbv-devel

Reply via email to