Start a new topic
Solved

Nextion compilling error

when compiling I keep getting this error. I have tried a few different things to solve it but nothing works. Please let me know how to fix the problem.


Software: Atmel studio 6.2 with visual micro.

Hardware: mega 2560 and Nextion NX3224T024


Error codes:

NexUpload.h:133: error: 'File' does not name a type NexUpload.cpp:In member function 'bool NexUpload::_checkFile()'

NexUpload.cpp:91: error: 'SD' was not declared in this scope NexUpload.cpp:96: error: 'SD' was not declared in this scope

NexUpload.cpp:100: error: '_myFile' was not declared in this scope NexUpload.cpp:100: error: 'SD' was not declared in this scope NexUpload.cpp:In member function 'bool NexUpload::_downloadTftFile()'

NexUpload.cpp:210: error: '_myFile' was not declared in this scope NexUpload.cpp:224: error: '_myFile' was not declared in this scope



2 people have this problem

This is only happen, with the new Master Library from the GIT.
If I use the old Stabel 0.7 Version, the problem does not exist.
The problem occurred under W7 and Linux (2 different PC's) . THe problem exist only with this library, not others :(

e.g. the example : COMPBUTTON.ino


In file included from /home/mad/sketchbook/libraries/Nextion/NexUpload.cpp:16:0:
/home/mad/sketchbook/libraries/Nextion/NexUpload.h:19:17: fatal error: SPI.h: Datei oder Verzeichnis nicht gefunden
 #include <SPI.h>
                 ^
compilation terminated.

if I add additional the SPI.h

#include "Nextion.h"
#include <SPI.h>

the hex .h file is not found
In file included from /home/mad/sketchbook/libraries/Nextion/NexUpload.cpp:16:0:
/home/mad/sketchbook/libraries/Nextion/NexUpload.h:20:16: fatal error: SD.h: Datei oder Verzeichnis nicht gefunden
 #include <SD.h>
                ^
compilation terminated.

---------------------------------------

#include "Nextion.h"
#include <SPI.h>
#include <SD.h>


/home/mad/sketchbook/libraries/Nextion/NexUpload.cpp:17:28: fatal error: SoftwareSerial.h: Datei oder Verzeichnis nicht gefunden
 #include <SoftwareSerial.h>
                            ^
compilation terminated.

----------------------------------------------------------------
#include "Nextion.h"
#include <SPI.h>
#include <SD.h>
#include <SoftwareSerial.h>



/home/mad/sketchbook/libraries/Nextion/NexUpload.cpp: In member function ‘bool NexUpload::_checkFile()’:
/home/mad/sketchbook/libraries/Nextion/NexUpload.cpp:96:29: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     if(!SD.exists(_file_name))
                             ^
In file included from /home/mad/sketchbook/libraries/Nextion/NexUpload.h:20:0,
                 from /home/mad/sketchbook/libraries/Nextion/NexUpload.cpp:16:
/usr/share/arduino/libraries/SD/SD.h:77:11: error:   initializing argument 1 of ‘boolean SDClass::exists(char*)’ [-fpermissive]
   boolean exists(char *filepath);
           ^









 

this library is in use (recommented on the wiki side :
https://github.com/itead/ITEADLIB_Arduino_Nextion

 

i have the same problem with spi.h, any solutions? thanks

I'm this moment I can only used the old released stable version. Uncomfortable you can not use the new feature : e.g. Numbers etc... You must convert them into a string and defined all as text
BTW. There is still an open ticket for investigation ongoing. Uncomfortable I did not received a solution for month. Last answer was, that the developer is on holiday

I will apologize for any past delays in receiving responses.


The ITEADLIB is being worked on as an ongoing process and provided as some semblance of an example.

Although the ITEADLIB was released, official support is limited to Level 2 to ensure the Nextion hardware works.


Coding questions and techniques should be posted in the Free Chat section where other users can try to assist with any Arduino related items (of which, you will see we try to assist where we can as well)


As this is not a Nextion Editor bug or a Nextion device bug, this topic will be marked as closed.