Links2004 / arduinoVNC

a VNC Client for Arduino based on rfbproto
GNU General Public License v2.0
301 stars 57 forks source link

Compile Error for ESP32 #12

Closed mltongca closed 5 years ago

mltongca commented 5 years ago

The source code does compile for ESP8266 successfully. When compiling for ESP32, the following error messages are shown. Please advise for any resolution. Thanks.

Arduino: 1.8.5 (Windows 10), Board: "MH ET LIVE ESP32DevKIT, 80MHz, 921600"

WARNING: Category '' in library XPT2046 is not valid. Setting to 'Uncategorized'
WARNING: library arduinoVNC-1.1 claims to run on (esp8266) architecture(s) and may be incompatible with your current board which runs on (esp32) architecture(s).
In file included from C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.h:31:0,

                 from C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:36:

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'void arduinoVNC::loop()':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:169:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("!connected\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::read_from_rfb_server(int, char*, size_t)':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:290:13: note: in expansion of macro 'DEBUG_VNC'

             DEBUG_VNC("[read_from_rfb_server] not connected!\n");

             ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:295:13: note: in expansion of macro 'DEBUG_VNC'

             DEBUG_VNC("[read_from_rfb_server] receive TIMEOUT!\n");

             ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::write_exact(int, char*, size_t)':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:320:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[write_exact] not connected!\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'void arduinoVNC::disconnect()':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:334:5: note: in expansion of macro 'DEBUG_VNC'

     DEBUG_VNC("[arduinoVNC] disconnect...\n");

     ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::rfb_connect_to_server(const char*, int)':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:351:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[rfb_connect_to_server] Connect error\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:355:5: note: in expansion of macro 'DEBUG_VNC'

     DEBUG_VNC("[rfb_connect_to_server] Connected.\n");

     ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::rfb_initialise_connection()':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:407:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[rfb_initialise_connection] _rfb_negotiate_protocol()  Faild!\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:412:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[rfb_initialise_connection] _rfb_authenticate()  Faild!\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:417:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[rfb_initialise_connection] _rfb_initialise_client()  Faild!\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:422:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[rfb_initialise_connection] _rfb_initialise_server() Faild!\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::_rfb_negotiate_protocol()':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:440:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[_rfb_negotiate_protocol] Not a valid VNC server\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:445:5: note: in expansion of macro 'DEBUG_VNC'

     DEBUG_VNC("[_rfb_negotiate_protocol] Server protocol: %s\n", msg);

     ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::_read_conn_failed_reason()':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:479:5: note: in expansion of macro 'DEBUG_VNC'

     DEBUG_VNC("[_read_conn_failed_reason] Connection to VNC server failed\n");

     ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::_read_authentication_result()':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:511:13: note: in expansion of macro 'DEBUG_VNC'

             DEBUG_VNC("Authentication Failed\n");

             ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::_rfb_authenticate()':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:590:13: note: in expansion of macro 'DEBUG_VNC'

             DEBUG_VNC("Server did not offer supported security type\n");

             ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:626:17: note: in expansion of macro 'DEBUG_VNC'

                 DEBUG_VNC("Server ask for password? but no Password is set.\n");

                 ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::_rfb_initialise_server()':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:690:5: note: in expansion of macro 'DEBUG_VNC'

     DEBUG_VNC("[VNC-SERVER] VNC Server config - Name: %s\n", opt.server.name);

     ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::rfb_set_format_and_encodings()':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:726:5: note: in expansion of macro 'DEBUG_VNC'

     DEBUG_VNC("[VNC-CLIENT] Supported Encodings:\n");

     ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::rfb_send_update_request(int)':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:820:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[rfb_send_update_request] write_exact failed!\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::rfb_set_continuous_updates(bool)':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:843:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[rfb_set_continuous_updates] write_exact failed!\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::rfb_handle_server_message()':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:923:29: note: in expansion of macro 'DEBUG_VNC'

                             DEBUG_VNC("[rfbEncodingLastRect] LAST\n");

                             ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:938:25: note: in expansion of macro 'DEBUG_VNC'

                         DEBUG_VNC("[0x%08X][%d] encoding Faild!\n", rectheader.encoding, rectheader.encoding);

                         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:950:17: note: in expansion of macro 'DEBUG_VNC'

                 DEBUG_VNC("SetColourMapEntries\n");

                 ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::_handle_server_cut_text_message(rfbServerToClientMsg*)':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:1019:5: note: in expansion of macro 'DEBUG_VNC'

     DEBUG_VNC("[_handle_server_cut_text_message] work...\n");

     ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::_handle_raw_encoded_message(rfbFramebufferUpdateRectHeader)':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:1078:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[_handle_raw_encoded_message] TO LESS MEMEORE TO HANDLE DATA!");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::_handle_hextile_encoded_message(rfbFramebufferUpdateRectHeader)':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:1222:9: note: in expansion of macro 'DEBUG_VNC'

         DEBUG_VNC("[_handle_hextile_encoded_message] too less memory!\n");

         ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:1298:21: note: in expansion of macro 'DEBUG_VNC'

                     DEBUG_VNC("[_handle_hextile_encoded_message] too less memory!\n");

                     ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp: In member function 'bool arduinoVNC::_handle_server_continuous_updates_message(rfbFramebufferUpdateRectHeader)':

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC_config.h:70:47: error: 'os_printf' was not declared in this scope

 #define DEBUG_VNC(...) os_printf( __VA_ARGS__ )

                                               ^

C:\Users\John\Documents\Arduino\libraries\arduinoVNC-1.1\src\VNC.cpp:1468:5: note: in expansion of macro 'DEBUG_VNC'

     DEBUG_VNC("[rfbEncodingContinuousUpdates] x: %d y: %d w: %d h: %d\n", rectheader.r.x, rectheader.r.y, rectheader.r.w, rectheader.r.h);

     ^

Multiple libraries were found for "WiFi.h"
 Used: C:\Users\John\Documents\Arduino\hardware\espressif\esp32\libraries\WiFi
 Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
Error compiling for board MH ET LIVE ESP32DevKIT.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Links2004 commented 5 years ago

the ESP32 has no os_printf function you can change the line here: https://github.com/Links2004/arduinoVNC/blob/master/src/VNC_config.h#L70 too:

#define DEBUG_VNC(...) Serial.printf( __VA_ARGS__ )

and if all is running you can remove the line to disable the Debugging. I have never testet if it runs on a ESP32 but if it does the frame rate will sure be better then on the ESP8266 :)