marlin "Undefined reference to macro when AUTO_BED_LEVELING && !AUTO_BED_LEVELING_GRID

Macros *_PROBE_BED_POSITION are conditionally defined in Configuration.h, only when (AUTO_BED_LEVELING &&) AUTO_BED_LEVELING_GRID is enabled. This macro is referenced in
Bug fixed by commit e30bfedce4d
Type UndeclaredIdentifier
Config "AUTO_BED_LEVELING && !AUTO_BED_LEVELING_GRID" (2nd degree)
Fix-in code
Location main/
#ifdef ENABLE_AUTO_BED_LEVELING
	#define AUTO_BED_LEVELING_GRID

	#ifdef AUTO_BED_LEVELING_GRID

		// set the rectangle in which to probe
		#define LEFT_PROBE_BED_POSITION 15
		
	  #else  // not AUTO_BED_LEVELING_GRID
		// with no grid, just probe 3 arbitrary points.  A simple cross-product
		// is used to esimate the plane of the print bed
		  #define ABL_PROBE_PT_1_X 15

	#endif // AUTO_BED_LEVELING_GRID
#endif // AUTO_BED_LEVELING


void process_commands(){
	
	#ifdef ENABLE_AUTO_BED_LEVELING
		int left_probe_bed_position=LEFT_PROBE_BED_POSITION; // ERROR
		
		#ifdef AUTO_BED_LEVELING_GRID
			int xGridSpacing = left_probe_bed_position;
		#else
			float z_at_pt_1, z_at_pt_2, z_at_pt_3;
		#endif
	#endif	
}

int main(int argc, char** argv)
{
	process_commands();
	return 0;
}

diff --git a/simple/e30bfed.c b/simple/e30bfed.c
--- a/simple/e30bfed.c
+++ b/simple/e30bfed.c
@@ -18,9 +18,9 @@
 void process_commands(){
 	
 	#ifdef ENABLE_AUTO_BED_LEVELING
-		int left_probe_bed_position=LEFT_PROBE_BED_POSITION; // ERROR
 		
 		#ifdef AUTO_BED_LEVELING_GRID
+			int left_probe_bed_position=LEFT_PROBE_BED_POSITION;
 			int xGridSpacing = left_probe_bed_position;
 		#else
 			float z_at_pt_1, z_at_pt_2, z_at_pt_3;
#ifdef ENABLE_AUTO_BED_LEVELING
	#define AUTO_BED_LEVELING_GRID

	#ifdef AUTO_BED_LEVELING_GRID

		// set the rectangle in which to probe
		#define LEFT_PROBE_BED_POSITION 15
		
	  #else  // not AUTO_BED_LEVELING_GRID
		// with no grid, just probe 3 arbitrary points.  A simple cross-product
		// is used to esimate the plane of the print bed
		  #define ABL_PROBE_PT_1_X 15

	#endif // AUTO_BED_LEVELING_GRID
#endif // AUTO_BED_LEVELING

int main(int argc, char** argv)
{
	#ifdef ENABLE_AUTO_BED_LEVELING
		int left_probe_bed_position=LEFT_PROBE_BED_POSITION; // ERROR
		
		#ifdef AUTO_BED_LEVELING_GRID
			int xGridSpacing = left_probe_bed_position;
		#else
			float z_at_pt_1, z_at_pt_2, z_at_pt_3;
		#endif
	#endif	
	return 0;
}

. call Marlin_main.cpp:1414: void process_commands()
. ERROR 1737: int left_probe_bed_position=LEFT_PROBE_BED_POSITION;