<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Cant compile M5ez.h]]></title><description><![CDATA[<p dir="auto">Hi, I am a relative beginner to arduino, M5Stack and  M5ez. I was trying to use M5ez in a test project however if I use #include &lt;M5ez.h&gt; then the sketch won't compile. Even the basic Hellow_World example included with the M5ez won't compile for me.</p>
<p dir="auto">I have follow all steps in <a href="https://github.com/M5ez/M5ez" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/M5ez/M5ez</a><br />
and installed both M5ez and ezTime library<br />
I have selected the correct board.</p>
<p dir="auto">Now, I turn to you, the masters of M5ez. What did I do wrong?</p>
<p dir="auto">---------------------------------------------- I get the following error ------------------------------------<br />
Arduino:1.8.19 (Windows 10), Kort:"M5Stack-Core-ESP32, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, None"</p>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp: In lambda function:</p>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1133:38: error: 'union arduino_event_info_t' has no member named 'disconnected'; did you mean 'eth_connected'?</p>
<pre><code>if(WIFI_REASON_ASSOC_FAIL == info.disconnected.reason) {

                                  ^~~~~~~~~~~~

                                  eth_connected
</code></pre>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp: In static member function 'static void ezWifi::begin()':</p>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1139:19: error: 'SYSTEM_EVENT_STA_DISCONNECTED' is not a member of 'arduino_event_id_t'</p>
<p dir="auto">}, WiFiEvent_t::SYSTEM_EVENT_STA_DISCONNECTED);</p>
<pre><code>               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp: In static member function 'static bool ezWifi::_connection(ezMenu*)':</p>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1410:13: error: 'struct esp_wps_config_t' has no member named 'crypto_funcs'</p>
<pre><code>  config.crypto_funcs = &amp;g_wifi_default_wps_crypto_funcs;

         ^~~~~~~~~~~~
</code></pre>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1410:29: error: 'g_wifi_default_wps_crypto_funcs' was not declared in this scope</p>
<pre><code>  config.crypto_funcs = &amp;g_wifi_default_wps_crypto_funcs;

                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1410:29: note: suggested alternative: 'g_wifi_default_wpa_crypto_funcs'</p>
<pre><code>  config.crypto_funcs = &amp;g_wifi_default_wps_crypto_funcs;

                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                         g_wifi_default_wpa_crypto_funcs
</code></pre>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1420:29: error: no matching function for call to 'onEvent(void (&amp;)(arduino_event_id_t, system_event_info_t))'</p>
<pre><code>  WiFi.onEvent(_WPShelper);

                         ^
</code></pre>
<p dir="auto">In file included from C:\Users\ERRA\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.4\libraries\WiFi\src/WiFiSTA.h:28,</p>
<pre><code>             from C:\Users\ERRA\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.4\libraries\WiFi\src/WiFi.h:32,

             from C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src/M5ez.h:36,

             from C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1:
</code></pre>
<p dir="auto">C:\Users\ERRA\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.4\libraries\WiFi\src/WiFiGeneric.h:159:21: note: candidate: 'wifi_event_id_t WiFiGenericClass::onEvent(WiFiEventCb, arduino_event_id_t)' &lt;near match&gt;</p>
<pre><code> wifi_event_id_t onEvent(WiFiEventCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX);

                 ^~~~~~~
</code></pre>
<p dir="auto">C:\Users\ERRA\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.4\libraries\WiFi\src/WiFiGeneric.h:159:21: note:   conversion of argument 1 would be ill-formed:</p>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1420:29: error: invalid conversion from 'void (<em>)(arduino_event_id_t, system_event_info_t)' to 'WiFiEventCb' {aka 'void (</em>)(arduino_event_id_t)'} [-fpermissive]</p>
<pre><code>  WiFi.onEvent(_WPShelper);

                         ^
</code></pre>
<p dir="auto">In file included from C:\Users\ERRA\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.4\libraries\WiFi\src/WiFiSTA.h:28,</p>
<pre><code>             from C:\Users\ERRA\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.4\libraries\WiFi\src/WiFi.h:32,

             from C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src/M5ez.h:36,

             from C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1:
</code></pre>
<p dir="auto">C:\Users\ERRA\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.4\libraries\WiFi\src/WiFiGeneric.h:161:21: note: candidate: 'wifi_event_id_t WiFiGenericClass::onEvent(WiFiEventSysCb, arduino_event_id_t)' &lt;near match&gt;</p>
<pre><code> wifi_event_id_t onEvent(WiFiEventSysCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX);

                 ^~~~~~~
</code></pre>
<p dir="auto">C:\Users\ERRA\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.4\libraries\WiFi\src/WiFiGeneric.h:161:21: note:   conversion of argument 1 would be ill-formed:</p>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1420:29: error: invalid conversion from 'void (<em>)(arduino_event_id_t, system_event_info_t)' to 'WiFiEventSysCb' {aka 'void (</em>)(arduino_event_t*)'} [-fpermissive]</p>
<pre><code>  WiFi.onEvent(_WPShelper);

                         ^
</code></pre>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp: In static member function 'static void ezWifi::_WPShelper(arduino_event_id_t, system_event_info_t)':</p>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:1467:17: warning: comparison between 'enum arduino_event_id_t' and 'enum system_event_id_t' [-Wenum-compare]</p>
<pre><code>if (event == SYSTEM_EVENT_STA_WPS_ER_PIN) {

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp: At global scope:</p>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:2238:2: warning: unknown escape sequence: '|'</p>
<p dir="auto">"KB14|!?:;\#$^&amp;#SP#KB15|*()_-+=|#Del#KB0|More#LCK:SYM|Lock#KB16|'"`@%\/#KB17|&lt;&gt;{}<a></a>#Done", //KB13</p>
<p dir="auto">^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p>
<p dir="auto">C:\Users\ERRA\Documents\Arduino\libraries\M5ez\src\M5ez.cpp:2241:2: warning: unknown escape sequence: '#'</p>
<p dir="auto">"'#"#`#@#%#/###Back",                //KB16</p>
<p dir="auto">^~~~~~~~~~~~~~~~~~~~~~</p>
<p dir="auto">Multiple libraries were found for "WiFi.h"</p>
<p dir="auto">Använd: C:\Users\ERRA\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.4\libraries\WiFi</p>
<p dir="auto">Oanvänd: C:\Program Files (x86)\Arduino\libraries\WiFi</p>
<p dir="auto">Multiple libraries were found for "SD.h"</p>
<p dir="auto">Använd: C:\Users\ERRA\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.4\libraries\SD</p>
<p dir="auto">Oanvänd: C:\Program Files (x86)\Arduino\libraries\SD</p>
<p dir="auto">exit status 1</p>
<p dir="auto">Error compiling for board M5Stack-Core-ESP32.</p>
<p dir="auto">This report would have more information with<br />
"Show verbose output during compilation"<br />
option enabled in File -&gt; Preferences.</p>
<p dir="auto">--------------------------------- End -----------------------------------------------------</p>
]]></description><link>https://community.m5stack.com/topic/4578/cant-compile-m5ez-h</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Mar 2026 20:48:07 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4578.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Sep 2022 07:19:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cant compile M5ez.h on Mon, 18 Aug 2025 16:30:31 GMT]]></title><description><![CDATA[<p dir="auto">using the mentioned changes hello_world example did compile and got uploaded to my core2. However , nothing is shown on screen, screen remains black.</p>
]]></description><link>https://community.m5stack.com/post/29790</link><guid isPermaLink="true">https://community.m5stack.com/post/29790</guid><dc:creator><![CDATA[jbruggem]]></dc:creator><pubDate>Mon, 18 Aug 2025 16:30:31 GMT</pubDate></item><item><title><![CDATA[Reply to Cant compile M5ez.h on Tue, 07 Mar 2023 23:34:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> said in <a href="/post/18526">Cant compile M5ez.h</a>:</p>
<blockquote>
<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/24986">@EricR</a></p>
<p dir="auto">without downgrading the Arduino ESP32 framework (e.g. using v2.0.3) I was able to compile M5ez with the following three modifications.</p>
<ul>
<li>In M5ez.h disable WPS by replacing<code>#define M5EZ_WPS</code> with <code>#define M5EZ_WPSx</code>.</li>
<li>In M5ez.cpp replace <code>info.disconnected.reason</code> with <code>info.wifi_sta_disconnected.reason</code>.</li>
<li>In M5ez.cpp replace <code>SYSTEM_EVENT_STA_DISCONNECTED</code> with <code>ARDUINO_EVENT_WIFI_STA_DISCONNECTED</code>.</li>
</ul>
<p dir="auto">Thanks<br />
Felix</p>
</blockquote>
<p dir="auto">Thanks! Just like Crazyhorse I came back to my M5 after about a year break. Your info saved a noob days of misery!!!</p>
]]></description><link>https://community.m5stack.com/post/20274</link><guid isPermaLink="true">https://community.m5stack.com/post/20274</guid><dc:creator><![CDATA[Opie91]]></dc:creator><pubDate>Tue, 07 Mar 2023 23:34:22 GMT</pubDate></item><item><title><![CDATA[Reply to Cant compile M5ez.h on Sat, 12 Nov 2022 11:20:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> said in <a href="/post/18526">Cant compile M5ez.h</a>:</p>
<blockquote>
<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/24986">@EricR</a></p>
<p dir="auto">without downgrading the Arduino ESP32 framework (e.g. using v2.0.3) I was able to compile M5ez with the following three modifications.</p>
<ul>
<li>In M5ez.h disable WPS by replacing<code>#define M5EZ_WPS</code> with <code>#define M5EZ_WPSx</code>.</li>
<li>In M5ez.cpp replace <code>info.disconnected.reason</code> with <code>info.wifi_sta_disconnected.reason</code>.</li>
<li>In M5ez.cpp replace <code>SYSTEM_EVENT_STA_DISCONNECTED</code> with <code>ARDUINO_EVENT_WIFI_STA_DISCONNECTED</code>.</li>
</ul>
<p dir="auto">Thanks<br />
Felix</p>
</blockquote>
<p dir="auto">Thanks a lot! I am starting again to program for M5Stack after a long time and I was having problems compiling M5ez and understanding where the problem was, but you solved this for me!</p>
]]></description><link>https://community.m5stack.com/post/19273</link><guid isPermaLink="true">https://community.m5stack.com/post/19273</guid><dc:creator><![CDATA[CrazyHorse80]]></dc:creator><pubDate>Sat, 12 Nov 2022 11:20:29 GMT</pubDate></item><item><title><![CDATA[Reply to Cant compile M5ez.h on Fri, 02 Sep 2022 12:53:53 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> and thanks. This helps a lot.</p>
]]></description><link>https://community.m5stack.com/post/18527</link><guid isPermaLink="true">https://community.m5stack.com/post/18527</guid><dc:creator><![CDATA[EricR]]></dc:creator><pubDate>Fri, 02 Sep 2022 12:53:53 GMT</pubDate></item><item><title><![CDATA[Reply to Cant compile M5ez.h on Fri, 02 Sep 2022 12:40:04 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/24986">@EricR</a></p>
<p dir="auto">without downgrading the Arduino ESP32 framework (e.g. using v2.0.3) I was able to compile M5ez with the following three modifications.</p>
<ul>
<li>In M5ez.h disable WPS by replacing<code>#define M5EZ_WPS</code> with <code>#define M5EZ_WPSx</code>.</li>
<li>In M5ez.cpp replace <code>info.disconnected.reason</code> with <code>info.wifi_sta_disconnected.reason</code>.</li>
<li>In M5ez.cpp replace <code>SYSTEM_EVENT_STA_DISCONNECTED</code> with <code>ARDUINO_EVENT_WIFI_STA_DISCONNECTED</code>.</li>
</ul>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18526</link><guid isPermaLink="true">https://community.m5stack.com/post/18526</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 02 Sep 2022 12:40:04 GMT</pubDate></item><item><title><![CDATA[Reply to Cant compile M5ez.h on Fri, 02 Sep 2022 12:06:11 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/24986">@EricR</a></p>
<p dir="auto">sorry if I wasn't clear - I meant the Arduino ESP32 framework. (I've clarified my previous post.)</p>
<p dir="auto">The Arduino ESP32 framework is installed via the Boards Manager. Normally the latest available version is installed. But any version can be selected and up-/downgraded to.</p>
<p dir="auto">Please be aware that when you downgrade the Arduino ESP32 framework in the Arduino IDE, that this will affect all your ESP32 related projects, which might then fail to compile due to a too old Arduino ESP32 framework version.</p>
<p dir="auto"><img src="/assets/uploads/files/1662119951986-arduinoesp32framework_220902.png" alt="0_1662119950146_ArduinoESP32Framework_220902.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">BTW: 1.8.19 is the version of the Arduino IDE you are using.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18525</link><guid isPermaLink="true">https://community.m5stack.com/post/18525</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 02 Sep 2022 12:06:11 GMT</pubDate></item><item><title><![CDATA[Reply to Cant compile M5ez.h on Fri, 02 Sep 2022 08:46:31 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> and thank for you're quick respond</p>
<p dir="auto">I was wondering  about the framework. To the best of my understanding do I use the 1.8.19 framework. It is what the upper left corner tells at least. Should M5ez not work for me?</p>
<p dir="auto">Do I have to reinstall Arduino IDE to "downgrade" to a framework that works?</p>
<p dir="auto">Thanks again for you're time</p>
]]></description><link>https://community.m5stack.com/post/18524</link><guid isPermaLink="true">https://community.m5stack.com/post/18524</guid><dc:creator><![CDATA[EricR]]></dc:creator><pubDate>Fri, 02 Sep 2022 08:46:31 GMT</pubDate></item><item><title><![CDATA[Reply to Cant compile M5ez.h on Fri, 02 Sep 2022 12:00:01 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/24986">@EricR</a></p>
<p dir="auto">you are not doing anything wrong. The issue is that the M5ez library has been written a while ago when Arduino ESP32 framework v1.x was the latest. However today we have Arduino ESP32 framework v2.x which moved some stuff around and by doing so broke some things.<br />
I see three options to go forward:</p>
<ul>
<li>adapt the M5ez to the latest Arduino ESP32 framework v2.x</li>
<li>use Arduino ESP32 framework v1.x</li>
<li>persuade Rop (the maintainer) to fix M5ez<br />
The last option might be difficult as I haven't seen Rop in the M5Stack forums for a long time.</li>
</ul>
<p dir="auto">BTW: in <code>M5ez.h</code> there are some #defines - you probably don't need all of them. For instance disabling WPS like this <code>#define M5EZ_WPSx</code> already reduces the errors.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18522</link><guid isPermaLink="true">https://community.m5stack.com/post/18522</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 02 Sep 2022 12:00:01 GMT</pubDate></item></channel></rss>