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

by Milan Stanojevic
Milan Stanojevic
Milan Stanojevic
Windows & Software Expert
Milan has been enthusiastic about PCs ever since his childhood days, and this led him to take interest in all PC-related technologies. Before joining WindowsReport, he worked as... read more
Affiliate Disclosure
  • No such file or directory or does not name a type error are common when compiling files in Arduino.
  • The surest way to fix them is to have the correct hierarchy of files and folders in the library folder.
  • Check out our dedicated Arduino section for more useful articles.
  • If programming is your thing, our Developer Tools section can help you find interesting articles and tools.
arduino doesn't name a type
To fix various PC problems, we recommend DriverFix:
This software will keep your drivers up and running, thus keeping you safe from common computer errors and hardware failure. Check all your drivers now in 3 easy steps:

  1. Download DriverFix (verified download file).
  2. Click Start Scan to find all problematic drivers.
  3. Click Update Drivers to get new versions and avoid system malfunctionings.
  • DriverFix has been downloaded by 0 readers this month.

For programing fans, Arduino can 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 an error message containing the syntagm no such file or directory or does not name a type.

Whenever you are getting this (and according to the forums, it is quite frequent), it means that the Arduino IDE can’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?

1. Download the library folder

Make sure to download the complete library for your specific folder from the available libraries in the Manage libraries menu. 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 should copy the library inside your Arduino folder.

The path of the file or folder should be:

Software/arduino-version number/libraries/library name/file.cpp OR file.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, the Arduino sketch folder is likely going to be called Documents/Arduino so you have to create the libraries folder and place the uncompressed library folder inside.

Then, make sure that the Documents/arduino/libraries/library contains the .cpp and .h files.

After you’ve done all this, close and reopen the Arduino IDE 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.

idee restoro Still having issues? Fix them with this tool:
  1. Download this PC Repair Tool rated Great on (download starts on this page).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues with Patented Technologies (Exclusive Discount for our readers).

Restoro has been downloaded by 0 readers this month.

Frequently Asked Questions

  • To add your own library, create a new directory in the libraries directory with the name of your library. The folder should contain a C or C++ file with your code and a header file with your function and variable declarations.

  • Arduino uses C++ with the addition of special methods and functions. Arduino code is referred to as sketches. If you encountered issues, have a look at our detailed problems and solutions for Arduino guide.

  • To manually add an Arduino library, navigate to the Include Library option, and install the version needed.

This article covers:Topics: