Export files in v1.3 - compile errors

Hi guys,

I recently updated from v1.2.3 to v1.3 and noticed the change of project structure in the exported files.
For some reason, I am getting some “undefined reference to” errors. I tried moving all files into 1 folder, I get rid of the screens errors, but I still get undefined reference errors on a few images (images that are inside some screens).

I searched around on the forum and docs but no luck.
Any help is much appreciated and needed, thank you!

Marius

/
/
/
/
/

What do you want to achieve?

Upload new build on ESP32-S3

What have you tried so far?

Searching the forum, some path modifications and shuffled files around

Screenshot or video

Attached above

Others

  • SquareLine Studio version: 1.3
  • Operating system: OS X 12.5
  • Target hardware: ESP32-S3

Hi,

did you set the sketchbook location as described in the README of the exported project?

Hi Gabor,

Thank you for your reply. I’m afraid I do not find any README file in the exported files or anywhere in the docs. I only see a CMakeList.txt and filelist.txt

Thoughts?

Marius

Ahh, I see the problem now. For Arduino, you need to export an Arduino project first. Due to the limitations of the Arduino build system, we need to export the UI code as a library. So please go to the “Project settings” and select “Arduino with TFT_eSPI” to get the initial project structure.

Hi @kisvegabor,

I have the settings as you suggested, but still nothing. I am using LovyanGFX instead of TFT_eSPI, but Lovyan is based on TFT_eSPI, I don’t think it matters.

https://github.com/lovyan03/LovyanGFX

Attached is a screenshot of my project structure.

Notice that my .ino is in the root folder. And I copy the Export-Files in the root so they are at the same level with the .ino. The “SquareLine-Studio” folder has the SLS project files (source, export, assets, etc.)

Hi,

You should export a a template project first to get an initial Arduino project structure. (Export → Create Template project).

1 Like

Ahh ok, makes sense.
I set the Sketchbook location like in README and copied some of my libraries in this new local “libraries” folder. It seems to work.

Thank you for your help as always!
Marius

1 Like

Hi @kisvegabor,

Although it seems to work, I get an error after sketch is uploaded:
Invalid library found in <my_path>/MyProject-UI/libraries/ui: Missing ‘maintainer’ from library

And the LCD is black, nothing loads. I can see it flashing as before, but nothing is rendered.
I tried to move all the libraries I had before into this local libraries folder, but no luck.

Maybe this project structure is not working with LovyanGFX library?
I would be reluctant to downgrade just so it can work like before, because in the future I would like to keep the project up-to-date.

Any clues? Thank you.

EDIT:
I managed to fix it by moving everything to Documents/Arduino/libraries. But still not sure why it doesn’t work in the other case (even if I moved all libraries).

EDIT2:
After some more trying and Arduino restart, it seems to work in project path (MyProject-UI/libraries) as well.

Finally does the display work too or on the compilation?

1 Like

Display works, all good as before. I also updated the LovyanGFX from 0.4 to 1.1 and have the latest lvgl

1 Like

Hi, I have, I think, the same problem but maybe more serious.
I need a more detailed explanation of the solution that has been found to this problem.
I had a project with 4 screens and 45 Widgets with the SLS 1.3.0 version with personal license and I updated it to 1.3.1 when proposed.
I use Arduino 2.0 on Windows and an ESP32-8048S070 display.
Libraries lvgl 8.3.9
Arduino_GFX 1.3.7
GT911 Library
Everything worked fine, even if I had to do many attempts before I had a project that compiled perfectly, but it ran fine on the display.
After the update, I decided to buy the monthly license to be able to increase the screens.
I had noticed that the .c files of the screens and images were after export, in dedicated folders.
The compiler couldn’t find them, so I put #include lines in my .ino file with the name and folder of the screens .c file.
The same was true for the images.
It worked, but increasing the screens and images seemed impractical because if I wanted to change the name, I would also have to change it in the #include .
I then searched the forum for a solution and found these posts.
I tried to do what explained here and now nothing works anymore, my project is no longer compiled and even creating a new simple one the compilation errors have increased. I probably messed with the libraries or .h files by moving them from one folder to another as explained and now I’m desperate.
From the forum, from the tutorials, and from the documentation, I don’t see a precise, detailed and step-by-step explanation to use SLS perfectly with Arduino. It all seems easy from the videos, in reality it is not like that because everyone has his own projects in the Arduino folder and cannot change the configuration every time just by working on a different project from the previous one.
I would like to kindly ask for detailed, step-by-step explanations that do not give the possibility of having doubts and that work for everyone.
I hope I didn’t waste my money, I was hoping for a working product and now if I can’t find a solution I’m stuck.
I apologize for the length of the message and maybe the few details, but I don’t know what to do anymore.
Thank you.

Hi, I managed to restore all the libraries and my project with Arduino and SLS. now it compiles perfectly.
I followed again all the procedure indicated in Howto - esp32-8048s070 board for Arduino which I had already partially followed. it’s OK now, thanks.

The problem that I wanted to solve by doing what I found explained here in previous posts still remains, but I probably did something wrong since I didn’t quite understand what and how to do it.
I explain the problem, maybe it’s not the same as explained by @mariuselz and @kisvegabor .

The .c files of the screens, images and components are exported to the respective folders and to be able to compile them in Arduino I have to copy them to the folder where I have my .ino file
Furthermore, in each of these files the #include “…/ui.h” line must be modified by removing the “…/” because otherwise the ui.h file is not found
Is what I’m doing right? is there another simpler and faster solution without having to open each file to go and change the text?
Thank you.