Using the 1.8 IDE, we kept getting a linker error because of multiple SPI.h files. We started by deleting SPI directories but still kept getting the error. So we decided to delete all the SPI directories and re-install them with the library manager. We deleted them all, then couldn't find an option to re-install them. How do we fix the mess we've gotten into?
Hi @flounder. SPI is a "platform bundled" library. This means the library is installed and updated via the Arduino IDE Boards Manager as a component of the boards platform, rather than via Library Manager as is the case with the standalone libraries.
The easiest solution will be to use Boards Manager to uninstall and then reinstall each of the platforms from which you deleted the SPI library. I'll provide general instructions for doing that:
- Select Tools > Board > Boards Manager from the Arduino IDE menus.
A "Boards Manager" dialog will appear. - Wait for the updates to finish, as shown by the messages printed at the bottom of the "Boards Manager" dialog.
- Scroll down through the list of boards platforms until you find the first one that is labeled "INSTALLED". Click on it.
Some buttons will appear on the entry. - Click the "Remove" button on the platform entry.
- Wait for the removal to finish.
- Click the "Install" button on the platform entry.
- Wait for the installation to finish.
- Repeat the remove+install process with each of the other installed platforms listed in Boards Manager.
- Click the "Close" button on the "Boards Manager" dialog.
Arduino IDE caches the files when you install a platform and reuses the cached files during subsequent installations that require them rather than downloading the files from the Internet all over again. So you will find that the reinstallations take much less time than the first time you installed the platforms.
After doing that, try compiling your sketch again. Hopefully in addition to fixing the problem of the missing SPI library, the linker error will also have been fixed. If not, I'm sure the helpers here on the forum can assist you with the linker error as well.
Thanks. That solved it
You are welcome. I'm glad it is working now.
Regards,
Per
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.