Share this article

Improve this guide

Seeing the Arduino does not name a type error? Fix it easily

2 min. read

Updated onOctober 4, 2023

updated onOctober 4, 2023

Share this article

Improve this guide

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

Key notes

For programing fans,Arduinocan be a great development platform that can be the starting point for many electronics projects and prototypes.

One of the common errors that Arduiono users stumble upon while compiling is anerror messagecontaining the syntagmno such file or directoryordoes not name a type.

Whenever you are getting this (and according to the forums, it is quite frequent), it means that theArduino IDEcan’t find the Adafruit libraries. The solution is to make sure that the file or folder has the right name and is in the right place.

What can I do to fix Arduino does not name a type error?

What can I do to fix Arduino does not name a type error?

1. Download the library folder

Make sure to download the complete library for your specific folder from the available libraries in theManage librariesmenu. Use the download option and allow the folder to be compressed as .zip or .tar.gz.

Then look for the folder in the Downloads folder of your device and uncompress it.

2. Move the folder in the right place

After downloading the folder and its files, you shouldcopy the library inside yourArduinofolder.

The path of the file or folder should be:

Software/arduino-version number/libraries/library name/file.cppORfile.c.

The structure of the library folder is very important and most of the time this is the cause for the mentioned errors.

Wrong paths:

Arduino/libraries/library name/library name/file.c

Arduino/libraries/MyLibraries/fodler name/file.c

On a Mac, theArduinosketch folder is likely going to be called Documents/Arduinoso you have to create thelibrariesfolder and place the uncompressed library folder inside.

Then, make sure that theDocuments/arduino/libraries/librarycontains the .cpp and .h files.

After you’ve done all this, close and reopen theArduinoIDE so that it recognizes the new library.

Hopefully, these indications have helped you to make the correct set-up for your libraries and it solves the issue. If you have any further ideas or comments, please level them in the dedicated section below.

[wl_navigator]

Milan Stanojevic

Windows Toubleshooting Expert

Milan has been enthusiastic about technology ever since his childhood days, and this led him to take interest in all PC-related technologies. He’s a PC enthusiast and he spends most of his time learning about computers and technology.

Before joining WindowsReport, he worked as a front-end web developer. Now, he’s one of the Troubleshooting experts in our worldwide team, specializing in Windows errors & software issues.

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Milan Stanojevic

Windows Toubleshooting Expert

Before joining WindowsReport, he worked as a front-end web developer. Now, he’s specialized in Windows errors & software issues.