<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Marlin does not compile with LCD support enabled (SOLVED)</title>
        <description> Hi there,

I&#039;m currently building Prusa i3 rework and trying to get Marlin to compile.
I&#039;m following these instructions [reprap.org] and have downloaded this already modified file [reprap.pt]

As is, this file compiles without problems.

I&#039;m trying to install a RepRapDiscount Full Graphic Smart Controller as per [reprap.org]
I have U8glib installed.

If i enable this in configuration.h

#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
Compiling will fail with:


Arduino: 1.6.8 (Windows 7), Board: &quot;Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)&quot;

sketch\Marlin_main.cpp:2108:36: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]

         LCD_MESSAGEPGM(MACHINE_NAME&quot; &quot;MSG_OFF&quot;.&quot;);

                                    ^

In file included from sketch\dogm_lcd_implementation.h:40:0,

                 from sketch\ultralcd.cpp:36:

sketch\ultralcd_st7920_u8glib_rrd.h: In function &#039;uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t*, u8g_dev_t*, uint8_t, void*)&#039;:

sketch\ultralcd_st7920_u8glib_rrd.h:40:95: warning: large integer implicitly truncated to unsigned type [-Woverflow]

 #define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((a)&amp;amp;0xf0);ST7920_SWSPI_SND_8BIT((a)&amp;lt;&amp;lt;4);u8g_10MicroDelay();}

                                                                                               ^

sketch\ultralcd_st7920_u8glib_rrd.h:63:9: note: in expansion of macro &#039;ST7920_WRITE_BYTE&#039;

         ST7920_WRITE_BYTE(0x3E);       //extended mode + GDRAM active

         ^

sketch\ultralcd_st7920_u8glib_rrd.h:40:95: warning: large integer implicitly truncated to unsigned type [-Woverflow]

 #define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((a)&amp;amp;0xf0);ST7920_SWSPI_SND_8BIT((a)&amp;lt;&amp;lt;4);u8g_10MicroDelay();}

                                                                                               ^

sketch\ultralcd_st7920_u8glib_rrd.h:67:11: note: in expansion of macro &#039;ST7920_WRITE_BYTE&#039;

           ST7920_WRITE_BYTE(0x80);     //set x = 0

           ^

sketch\ultralcd_st7920_u8glib_rrd.h:40:95: warning: large integer implicitly truncated to unsigned type [-Woverflow]

 #define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((a)&amp;amp;0xf0);ST7920_SWSPI_SND_8BIT((a)&amp;lt;&amp;lt;4);u8g_10MicroDelay();}

                                                                                               ^

sketch\ultralcd_st7920_u8glib_rrd.h:94:13: note: in expansion of macro &#039;ST7920_WRITE_BYTE&#039;

             ST7920_WRITE_BYTE(0x80);           //x=0

             ^

sketch\ultralcd_st7920_u8glib_rrd.h:40:95: warning: large integer implicitly truncated to unsigned type [-Woverflow]

 #define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((a)&amp;amp;0xf0);ST7920_SWSPI_SND_8BIT((a)&amp;lt;&amp;lt;4);u8g_10MicroDelay();}

                                                                                               ^

sketch\ultralcd_st7920_u8glib_rrd.h:99:13: note: in expansion of macro &#039;ST7920_WRITE_BYTE&#039;

             ST7920_WRITE_BYTE(0x80 | 8);       //x=64

             ^

sketch\ultralcd.cpp: In function &#039;void config_lcd_level_bed()&#039;:

ultralcd.cpp:758: error: &#039;lcd&#039; was not declared in this scope

   lcd.clear(); 

   ^

sketch\ultralcd.cpp: In function &#039;void lcd_level_bed_cooling()&#039;:

ultralcd.cpp:769: error: &#039;lcd&#039; was not declared in this scope

           lcd.setCursor(0, 0);

           ^

ultralcd.cpp:791: error: &#039;lcd&#039; was not declared in this scope

    lcd.clear();

    ^

sketch\ultralcd.cpp: In function &#039;void lcd_level_bed()&#039;:

ultralcd.cpp:800: error: &#039;lcd&#039; was not declared in this scope

        lcd.clear(); 

        ^

sketch\ultralcd.cpp: In function &#039;void lcd_load_material_extrud_1()&#039;:

ultralcd.cpp:944: error: &#039;lcd&#039; was not declared in this scope

     lcd.setCursor(3, 2);

     ^

sketch\ultralcd.cpp: In function &#039;void lcd_unload_material_extrud_1()&#039;:

ultralcd.cpp:990: error: &#039;lcd&#039; was not declared in this scope

     lcd.setCursor(3, 2);

     ^

sketch\ultralcd.cpp: In function &#039;void lcd_init()&#039;:

ultralcd.cpp:1418: error: &#039;lcd&#039; was not declared in this scope

     lcd.clear();

     ^

exit status 1
&#039;lcd&#039; was not declared in this scope

This report would have more information with
&quot;Show verbose output during compilation&quot;
option enabled in File -&amp;gt; Preferences.

Any ideas?</description>
        <link>https://reprap.org/forum/read.php?415,660103,660103#msg-660103</link>
        <lastBuildDate>Tue, 21 Jul 2026 21:24:18 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?415,660103,660284#msg-660284</guid>
            <title>Re: Marlin does not compile with LCD support enabled (SOLVED)</title>
            <link>https://reprap.org/forum/read.php?415,660103,660284#msg-660284</link>
            <description><![CDATA[ That must be a custom version of Marlin. Keep an eye out for the Marlin 1.1.0 release, coming soon. Meanwhile, we have a new release candidate posted at [<a href="https://github.com/MarlinFirmware/Marlin/releases" target="_blank"  rel="nofollow">github.com</a>]]]></description>
            <dc:creator>Thinkyhead</dc:creator>
            <category>Firmware - Marlin</category>
            <pubDate>Wed, 04 May 2016 15:57:09 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?415,660103,660132#msg-660132</guid>
            <title>Re: Marlin does not compile with LCD support enabled</title>
            <link>https://reprap.org/forum/read.php?415,660103,660132#msg-660132</link>
            <description><![CDATA[ Problem solved.<br />
<br />
Had to comment out WITBOX<br />
<br />
<pre class="bbcode">
#define WITBOX</pre>
to<br />
<pre class="bbcode">
//#define WITBOX
</pre>]]></description>
            <dc:creator>Veesta</dc:creator>
            <category>Firmware - Marlin</category>
            <pubDate>Wed, 04 May 2016 09:37:46 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?415,660103,660103#msg-660103</guid>
            <title>Marlin does not compile with LCD support enabled (SOLVED)</title>
            <link>https://reprap.org/forum/read.php?415,660103,660103#msg-660103</link>
            <description><![CDATA[ Hi there,<br />
<br />
I'm currently building Prusa i3 rework and trying to get Marlin to compile.<br />
I'm following these instructions [<a href="http://reprap.org/wiki/Prusa_i3_Rework_Firmware" target="_blank"  rel="nofollow">reprap.org</a>] and have downloaded this already modified file [<a href="http://reprap.pt/downloads/Marlin_Prusai3_reprap_pt.zip" target="_blank"  rel="nofollow">reprap.pt</a>]<br />
<br />
As is, this file compiles without problems.<br />
<br />
I'm trying to install a RepRapDiscount Full Graphic Smart Controller as per [<a href="http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller" target="_blank"  rel="nofollow">reprap.org</a>]<br />
I have U8glib installed.<br />
<br />
If i enable this in configuration.h<br />
<pre class="bbcode">
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER</pre>
Compiling will fail with:<br />
<br />
<pre class="bbcode">
Arduino: 1.6.8 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

sketch\Marlin_main.cpp:2108:36: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]

         LCD_MESSAGEPGM(MACHINE_NAME" "MSG_OFF".");

                                    ^

In file included from sketch\dogm_lcd_implementation.h:40:0,

                 from sketch\ultralcd.cpp:36:

sketch\ultralcd_st7920_u8glib_rrd.h: In function 'uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t*, u8g_dev_t*, uint8_t, void*)':

sketch\ultralcd_st7920_u8glib_rrd.h:40:95: warning: large integer implicitly truncated to unsigned type [-Woverflow]

 #define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((a)&amp;0xf0);ST7920_SWSPI_SND_8BIT((a)&lt;&lt;4);u8g_10MicroDelay();}

                                                                                               ^

sketch\ultralcd_st7920_u8glib_rrd.h:63:9: note: in expansion of macro 'ST7920_WRITE_BYTE'

         ST7920_WRITE_BYTE(0x3E);       //extended mode + GDRAM active

         ^

sketch\ultralcd_st7920_u8glib_rrd.h:40:95: warning: large integer implicitly truncated to unsigned type [-Woverflow]

 #define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((a)&amp;0xf0);ST7920_SWSPI_SND_8BIT((a)&lt;&lt;4);u8g_10MicroDelay();}

                                                                                               ^

sketch\ultralcd_st7920_u8glib_rrd.h:67:11: note: in expansion of macro 'ST7920_WRITE_BYTE'

           ST7920_WRITE_BYTE(0x80);     //set x = 0

           ^

sketch\ultralcd_st7920_u8glib_rrd.h:40:95: warning: large integer implicitly truncated to unsigned type [-Woverflow]

 #define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((a)&amp;0xf0);ST7920_SWSPI_SND_8BIT((a)&lt;&lt;4);u8g_10MicroDelay();}

                                                                                               ^

sketch\ultralcd_st7920_u8glib_rrd.h:94:13: note: in expansion of macro 'ST7920_WRITE_BYTE'

             ST7920_WRITE_BYTE(0x80);           //x=0

             ^

sketch\ultralcd_st7920_u8glib_rrd.h:40:95: warning: large integer implicitly truncated to unsigned type [-Woverflow]

 #define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((a)&amp;0xf0);ST7920_SWSPI_SND_8BIT((a)&lt;&lt;4);u8g_10MicroDelay();}

                                                                                               ^

sketch\ultralcd_st7920_u8glib_rrd.h:99:13: note: in expansion of macro 'ST7920_WRITE_BYTE'

             ST7920_WRITE_BYTE(0x80 | 8);       //x=64

             ^

sketch\ultralcd.cpp: In function 'void config_lcd_level_bed()':

ultralcd.cpp:758: error: 'lcd' was not declared in this scope

   lcd.clear(); 

   ^

sketch\ultralcd.cpp: In function 'void lcd_level_bed_cooling()':

ultralcd.cpp:769: error: 'lcd' was not declared in this scope

           lcd.setCursor(0, 0);

           ^

ultralcd.cpp:791: error: 'lcd' was not declared in this scope

    lcd.clear();

    ^

sketch\ultralcd.cpp: In function 'void lcd_level_bed()':

ultralcd.cpp:800: error: 'lcd' was not declared in this scope

        lcd.clear(); 

        ^

sketch\ultralcd.cpp: In function 'void lcd_load_material_extrud_1()':

ultralcd.cpp:944: error: 'lcd' was not declared in this scope

     lcd.setCursor(3, 2);

     ^

sketch\ultralcd.cpp: In function 'void lcd_unload_material_extrud_1()':

ultralcd.cpp:990: error: 'lcd' was not declared in this scope

     lcd.setCursor(3, 2);

     ^

sketch\ultralcd.cpp: In function 'void lcd_init()':

ultralcd.cpp:1418: error: 'lcd' was not declared in this scope

     lcd.clear();

     ^

exit status 1
'lcd' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -&gt; Preferences.</pre>
<br />
Any ideas?]]></description>
            <dc:creator>Veesta</dc:creator>
            <category>Firmware - Marlin</category>
            <pubDate>Wed, 04 May 2016 08:16:50 -0400</pubDate>
        </item>
    </channel>
</rss>
