Trying to open old project but getting errors

I have been here 4-5 years ago when I was developing a WiFi based serial adapter to a data collection system. It uses an ESP-07S (ESP8266 based module).
At the time I used an IDE for Arduino named Sloeber.
Now I have a new computer (HP but Win7 => Win10, Sloeber 4.3 => 4.4.1)
I need to use the old project as a starting point for a new project, where I will cut away stuff no longer needed and modify some parts of it.

But I am having a big problem just loading the old project into Sloeber successfully even though I have followed the toolset readme written when the old project was done.

One example:
ESP8266WebServer httpServer(80);
... further down:
httpServer.begin(); <<= This gives an error "Method begin could not be resolved"

Why is this?
The project built fine back when it was developed.

did you install all the same libraries?

Well, according to the notes in the project ino file:

  • Open project properties and set the following:
    • Platform folder: ..../esp8266/2.4.1 (If this is not available then you have to use the library manager and download it)
    • Board: Generic ESP8266 Module

The platform folder requested was not available in the selector box...
So I selected this instead:
.../esp286/hardware/esp8266/3.0.2

Did not work.

BTW the paths seem to have changed from when I last used the Sloeber toolchain....

And I didn't know where the "library manager" is located either...
After much searching and clicking I finally found it in the menus as follows:
Sloeber-Preferences-Sloeber-LibraryManager

Is it a manager for the project or is it for the tool Sloeber itself?

Anyway I found it as shown above and could add the library
And then in Project-Properties-Platformfolder I could select the 2.4.1 location.

But this just caused the number of errors to shift to a larger set, for instance now it cannot find the include <ESP8266WiFi.h> file.
Same for <EEPROM.h> and <ESP8266WebServer.h>.

What should I do in order to fix this???
I assume that there is some other library or such that has to be added, but how can one figure out which?

:cry:

Is there a file in an Arduino project where the used libraries with version numbers are listed?
If so I could see there what needs to be installed/activated, but as it is now I am grappling in the dark...

It seems very strange that the project dir does not contain all the info needed to build a working system...

Well how about you share the code so we can have a look. From core 2.4.1 to 3.0.2 is a fair sized step, but it should work normally speaking, still if you want to exclude that as a cause, you can 'uninstall' core version 3.0.2 and install 2.4.1 Please do make sure that you uninstall any core before installing a different version, or the IDE will probably start to mess things up.

Thanks, I am still confused by the word "install" concerning the scope of the library. What goes into the Sloeber toolchain irrespective of loaded project and what goes into the project exclusively?

And how are you supposed to share a project with others in a way that it will work when loaded somewhere else? Should not these library items be part of the project itself? I talked yesterday with an associate who has made some changes to a project of mine checked into Subversion and he tells me he never was able to get it to work in Sloeber, so he had to use the Arduino IDE instead. Of course then one is missing all the important coding tools one is used to in most dev tools.

I have found a readme file inside a test project from when I started back in 2018 where it says:

NOTE about library setup:

Before opening the checked out project you need to prepare the IDE by installing needed libraries.
This is done as follows:

  • Go to menu Window/Preferences/Arduino/Platforms and Boards
  • enter esp8266 in the top "filter" box
  • expand esp8266/esp8266 to view all available versions
  • check the boxes for 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0 and 2.4.1
  • click Apply and Close
  • Now wait for the activity to end as shown in a very small progress bar in the lower right corner.

With this done the system has been prepared to work with ESP8266 boards using all releases.
The project currently uses version 2.0.0 (2018-03-14) but this may change in the future.
My tests with 2.4.1 resulted in a build error inside the library itself, so I backed down to 2.0.0

When I look here:
Sloeber/Preferences/Sloeber/Platforms and boards
I see two items marked with a black square containing checked versions:

  • arduino/Arduino AVR boards/1.8.5
  • esp8266/esp8266/2.4.1

Sloeber/Preferences/Sloeber/Library Manager
Here I see various checked items when digging down:
-Communication

  • ESP8266_AT_WebServer 1.5.4
  • Ethernet 2.0.1
  • GSM 1.0.6

-Data Processing

  • ArduinoJson 6.19.4

-Data Storage

  • SD 1.2.4

-Device control

  • Firmata 2.5.8 (what is this?)
  • Keyboard 1.0.4
  • Mouse 1.0.1
  • Servo 1.1.8
  • Stepper 1.1.3

-Display

  • LiquidCrystal 1.0.7
    -TFT 1.0.6

-Sensors

  • CapacitiveSensor 0.5.1

I have no idea why most of these are there...
I definitely did not add use of anything except ESP8266 stuff.

Project/Properties
Here I have this (screenshot):

Notice the "Platform folder" item, it is totally disjunct from any part of the development tools I use. I never ever place working files in the C: drive, all is on the data drive D:, which is backed up separately.
And this folder will never be available to anyone else either...
But I guess it is where the sloeber toolchain stores its data together with itself, which is sort of acceptable.

Well look i don't use 'sloeber' but just the Arduino IDE, so i can only give you information about that.

This is what in the Arduino IDE should be prevented, and rather you should have only 1 ESP core installed at the time to prevent the IDE from choosing the wrong library / core file. The issue is not so much in the core files themselves, it won't screw that up, as it is in the so called 'built-in libraries' (like the ESP8266Webserver) which have been updated for newer core versions and may not be compatible with older ones.

They could be, but the core is the core. You could save any addition libraries with the project manually, and just specify which core you used (which you probably should anyway)
But you should do this for any included library in that case (even if they are built in to the core installation)

There is no one stopping you from using an external editor and doing the compilation either through the Arduino IDE or the command line.

These could have come built in with sloeber or other parts that you have installed.
Anyway, your issue is with sloeber (and it's installation) , but i suspect a compatibility issue between built in libraries of different cores (it is actually possible that this issue does not exist between cores 2.x.x but only becomes apparent when having used core 3.x.x) So again 'uninstall all cores' !! and install 1 ESP core. The cores are nearly fully backwards compatible (though later versions are a bit more bloated) but some libraries aren't. Also newer versions or releases of libraries may not be compatible with older cores (just had to deal with one myself)
core 2.7.4 is favored by many as being complete and stable and fully compatible with cores 2 and up.
3.0.2 is the newest and therefore one would say the best.
i use 2.4.2 which excludes https support, but is a fair bit more skinny (and i need that for some applications)
If you keep having issues with sloeber, i suggest you visit a sloeber forum.

I think I now know why it won't work!
When I select the library ESP8266WiFi in Project explorer the following is shown in the bottom of the screen:

Notice how it is still referencing 3.0.2 even though I have removed that library and set the project to use 2.4.2 instead!

image

So there is something the matter with how Sloeber is handling updates to the used libraries.
And I have not found any useful forum except this to ask programming questions...

I guess your best chance is to do a complete uninstall of sloeber as well.
As said the arduino IDE also suffers from these kind of things, but sloeber appears to be making things worse.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.