Newbie Help...No such file or directory. Compilation terminated.

ok im a newbie here :slight_smile: I keep getting a error... (when sending a file into the mega2560....Cant figure what im doing wrong ;( I think I have everything correct... it may be a directory problem...

If anyone can help Id REALLY appreciate it...

Im getting a error on a file (see title or pic below.)

I CAN see the FILE in a folder that is one LEVEL up...

the file/error: Adafruit_NeoPixel.h: No such file or directory

I can see it in the FOLDER one level up in C:\Users\Administrator\Documents\Arduino\libraries\NeoPixel

Im sure it may be or is a directory tree (folder location problem) but im not sure ;(

Thanks in advance

What is your sketchbook folder set to in File > Preferences > Sketchbook location?

@pert , thanks on the reply :)... just now saw it....
the location is:C:\Users\Administrator\Documents\Arduino

here is all the Folders etc....

C:\Users\Administrator\Documents\Arduino\pushbuttonlinein\Libraries\NeoPixel
C:\Users\Administrator\Documents\Arduino\pushbuttonlinein\Libraries\FastLED
C:\Users\Administrator\Documents\Arduino\pushbuttonlinein\Libraries
C:\Users\Administrator\Documents\Arduino\pushbuttonlinein (this folder has all of the INO Files for the project)

Libraries must be installed to the libraries subfolder of your sketchbook folder. In your case, that is C:\Users\Administrator\Documents\Arduino\libraries.

You need to copy C:\Users\Administrator\Documents\Arduino\pushbuttonlinein\Libraries\NeoPixel to C:\Users\Administrator\Documents\Arduino\libraries.

More information here:

Ive looked at the link and dont see anything new....

The place I got the files from already had the library files... and I put there where the author said to...

so I still dont understand whats wrong ;( which sucks as ive spent a bit of $$ on this project hardware and all and have a paperweight ;(

This is where the project is from and it has the link to all the files in the description...

& the files are under MORE INFO

Please can you post the code that you are trying to compile and the full error messages that you get

Please read this before posting a programming question

ok here goes let me know if im missing something :slight_smile:
I RT click the file named: pushbuttonlinein.ino
and it OPENS arduino with the CODE below in TAB # 1.... and about 7+ more tabs open beside it (code for the additional options for this project)

it wont let me post the code here... over 9000 characters... it wont let me attach the RAR file.... 9 MB

this is the link to the RAR

Its the one that says: (in the folder)... push_button_line_in

And it has the libraries included...

/////////////ERROR INFO///////////
Arduino: 1.6.5 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

pushbuttonlinein.ino:2:35: fatal error: Adafruit_NeoPixel.h: No such file or directory
compilation terminated.
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

** My directory TREE is above in a previous mssg in this thread...... only 4 or 5 mssgs above...

thanks !

The place I got the files from already had the library files... and I put there where the author said to...

Did you put the library files where @pert told you to put them?

Libraries must be installed to the libraries subfolder of your sketchbook folder. In your case, that is C:\Users\Administrator\Documents\Arduino\libraries.

yep, I believe Ive done all correctly :slight_smile: here is a screen shot showing directory layout and error etc :slight_smile:

Am I missing anything or anything else I need to check ?

as from the screenshot... it says this is missing: Adafruit_NeoPixel.h

im not sure where that is supposed to come from (a library maybe ?) as it isnt in his libraries he included with the project :slight_smile:

here is a screen shot showing directory layout

Your file layout does not look correct.

At the level of Documents>Arduino there should be sketches in folders and a folder called libraries.

In that library folder there should be Adafruit NeoPixel and FastLed. You can install them through the library manager of the ide.

thanks on the reply !
ughhhh how annoying....

So I went to sketch->include library->manage
and typed in the search bar... FAST LED and NEOPIXEL,,,,,

Added/installed both :slight_smile:
restarted arduino software...
loaded file (rt click edit arduino (main file called pushbuttonlinein.ino)
it opens, pressed right arrow... got this error...

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from pushbuttonlinein.ino:3:0:
C:\Users\Administrator\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.006

pragma message "FastLED version 3.002.006"

^
pushbuttonlinein:1748: error: invalid conversion from 'void ()(boolean) {aka void ()(bool)}' to 'void ()()' [-fpermissive]
pushbuttonlinein:1748: error: invalid conversion from 'void (
)(uint8_t) {aka void ()(unsigned char)}' to 'void ()()' [-fpermissive]
invalid conversion from 'void ()(boolean) {aka void ()(bool)}' to 'void (*)()' [-fpermissive]

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

In file included from pushbuttonlinein.ino:3:0:
C:\Users\Administrator\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.006

pragma message "FastLED version 3.002.006"

^

I do not think this is a problem as I see this in the library

#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
#define FASTLED_HAS_PRAGMA_MESSAGE
#endif

#define FASTLED_VERSION 3002006
#ifndef FASTLED_INTERNAL
#  ifdef FASTLED_HAS_PRAGMA_MESSAGE
#    pragma message "FastLED version 3.002.006"
#  else
#    warning FastLED version 3.002.006  (Not really a warning, just telling you here.)
#  endif
#endif

You can certainly try to run some of the Fast Led library examples to verify that all is OK.

pushbuttonlinein:1748: error: invalid conversion from 'void ()(boolean) {aka void ()(bool)}' to 'void ()()' [-fpermissive]
pushbuttonlinein:1748: error: invalid conversion from 'void (
)(uint8_t) {aka void ()(unsigned char)}' to 'void ()()' [-fpermissive]
invalid conversion from 'void ()(boolean) {aka void ()(bool)}' to 'void (*)()' [-fpermissive]

You will have to post the code at line 1748.

unfortunately im a newbie and have no clue ;( 1st time ive ever owned a arduino ;(

I figured it would be straightforward install arduino s/w
load code program arduino and bootup and wire up hardware :slight_smile: (lol)

Ive flashed stuff before, programmed microcontrollers/eproms etc
but have no idea why this isnt more straightforward ;(

Watched the youtube video of this project, got the code did the wiring of the circuit etc... but have failed on getting code into arduino ;(

You are using a very old version of the Arduino IDE. Since the Arduino AVR Boards hardware package used by the Arduino Mega is bundled with the Arduino IDE, you are also using a very outdated version of Arduino AVR Boards. In more recent versions of Arduino AVR Boards, Arduino updated to a new compiler version. That compiler update caused some bad code that compiled with the old compiler to no longer compile. In order to provide backwards compatibility, Arduino added the -fpermissive compiler flag, which caused the old bad code to continue to compile. As a side effect of -fpermissive, it allowed even more bad code to compile than ever before. The pushbuttonlinein sketch you found contains some of this bad code, and thus will only compile if you are using a modern version of Arduino AVR Boards. Although it is probably possible for you to just update Arduino AVR Boards via Boards Manager, I would recommend that you go ahead and update your Arduino IDE instead, unless you actually have a good reason for sticking with Arduino IDE 1.6.5.

You can download the Arduino IDE here:

@pert... thanks on the reply/follow up :slight_smile: and the explanation (which I mostly understand) lol....

The writer of the code ORIGINALLY had to use only 1.6.5.... so thats what I did (Your reason posted makes sense!)

Anyways i FINALLY got a hold of the one who coded it etc,... he did give me some new instructions etc and new files etc.... so im going to try what he said... part of what he said was what you said to change from 1.6.5 to newer as I guess his newer code also has taken care of the problem you explained ! Ill update you once I try his newer code/version of arduino ide.... etc and follow up here :slight_smile: I DO APPRECIATE YOUR HELP !!! :slight_smile:

Arduino AVR Boards is a package of software that allows the Arduino IDE to program the Arduino boards of the AVR architecture, such as Uno, Mega, Leonardo. There are also other packages you can install to add support for other architectures, such as the SAMD architecture used by the Arduino Zero and MKR boards.

Because the Arduino IDE comes with a bundled version of Arduino AVR Boards, we're used to associating a particular version of Arduino AVR Boards with each version of the Arduino IDE. However, the Boards Manager feature now allows us to use any version of Arduino AVR Boards with any version of the Arduino IDE. The author of the code may have been using the old IDE version with a new Arduino AVR Boards version. You could do the same if you wanted. The reason I recommended updating the IDE is because there have been some isolated issues where a particular Arduino AVR Boards version had issues with some older IDE versions. I have no idea whether Arduino AVR Boards 1.6.23 will have problems with Arduino IDE 1.6.5. What I do know is that Arduino IDE 1.8.9 works fine with Arduino AVR Boards 1.6.23. So it seemed like the safest advice. However, you could likely continue to use Arduino IDE 1.6.5 if you prefer.

Thanks on the help so far !!!

The author if the project.... told me to goto version 1.8.9, he gave me a copy of the LIBRARIES and his sketches (as its called I guess...) he had me change a few things tools-boad-board manager- and choose version 1.6.20 etc etc....

so maybe my LAST ?.

this project I guess main file is called 'pushbuttonlinein' and UNDER that it has a lot of other *.ino files like "color","drip","fire" etc....

so I LOAD pushbuttonlinein and when I do that Ill see TABS open up next to it of "color""Drip""Fire" etc....

do I need to UPLOAD EACH tab individually ? or just the "main" one ?

thanks in advance :slight_smile:

Transam98:
do I need to UPLOAD EACH tab individually ? or just the "main" one ?

Just the main one. That will upload everything. The multiple tabs are all part of a single program, it's just split into multiple files to make it easier to work with.

Gotchya, Ok I DID upload each individually.... (me jumping ahead ahha)....

So should I PRESS the RED RESET Button, then reboot the arduino(mega 2560) (aka unplug usb then plug back in) and upload just the 1 file ?

thanks ! you have been a great help and im very grateful ! :slight_smile: